在没有回发的情况下扩展树视图 [英] Expanding a treeview without postback

查看:52
本文介绍了在没有回发的情况下扩展树视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以通过单击节点文本(不单击展开

图像URL)来扩展树视图控件上的父节点

_而不用回发_ ?


我想格式化树视图节点,使其看起来像一串按钮,这些按钮会扩展以显示子节点(如果有子节点)qithout一个

的回发。我不想显示正/负或任何其他

展开/折叠图形。





JJ

Is there any way you can expand a parent node on the treeview control
_without a postback_ by clicking on the node text (NOT clicking the expand
image URL) ?

I want to format the treeview node to look like a column of buttons that
expand to show the child nodes (if there are child nodes) qithout a
postback. I don''t want to display the plus/minus or any other
expand/collapse graphic.

?

JJ

推荐答案

" JJ" < ab*@xyz.com写信息

新闻:Ox ************** @ TK2MSFTNGP06.phx.gbl ...
"JJ" <ab*@xyz.comwrote in message
news:Ox**************@TK2MSFTNGP06.phx.gbl...

有没有什么方法可以在树视图控件上展开父节点

_没有回发_点击节点文本(不点击展开

图片网址)?
Is there any way you can expand a parent node on the treeview control
_without a postback_ by clicking on the node text (NOT clicking the expand
image URL) ?



将节点的SelectAction属性设置为TreeNodeSelectAction.Expand
http://www.google。 co.uk/search?sourc...ction%2eExpand


谢谢Mark。


你也是知道你是否可以格式化父母和孩子的悬停样式

节点不同?对于

整个树视图似乎只有一个''HoverNodeStyle''。


如果我希望父母看起来像按钮,孩子们看起来比如

别的东西,还有

< LevelStylestag,但除了每个

级别的固定样式之外什么也没有据我所知(即每个级别没有HoverStyle)。


我想我可以尝试将节点格式化为其数据绑定,具体取决于它的价值

深度?


JJ。


" Mark Rae" < ma ** @ markNOSPAMrae.com写信息

新闻:%2 **************** @ TK2MSFTNGP03.phx.gbl ...
Thanks Mark.

Do you also know if you can format the hover styles for the parent and child
nodes differently? There only seems to be one ''HoverNodeStyle'' for the
entire treeview.

If I want the parents to look like buttons and the children to look like
something else, there is the
<LevelStylestag, but it doens''t have anything but a fixed style for each
level as far as I can see (i.e. no HoverStyle for each level).

I guess I could try to format the node as its databound, depending on its
depth?

JJ.


"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...

" JJ" < ab*@xyz.com写信息

新闻:Ox ************** @ TK2MSFTNGP06.phx.gbl ...
"JJ" <ab*@xyz.comwrote in message
news:Ox**************@TK2MSFTNGP06.phx.gbl...

>有没有办法可以通过点击节点文本(不点击
展开图片网址)来扩展树视图控件上的父节点
_没有回发_ )?
>Is there any way you can expand a parent node on the treeview control
_without a postback_ by clicking on the node text (NOT clicking the
expand image URL) ?



将节点的SelectAction属性设置为TreeNodeSelectAction.Expand
http://www.google。 co.uk/search?sourc...ction%2eExpand



" JJ" < ab*@xyz.com写信息

新闻:e5 ************** @ TK2MSFTNGP05.phx.gbl ...
"JJ" <ab*@xyz.comwrote in message
news:e5**************@TK2MSFTNGP05.phx.gbl...

您是否也知道您是否可以为父节点和

子节点格式化悬停样式?
Do you also know if you can format the hover styles for the parent and
child nodes differently?



对不起 - 不知道......

Sorry - no idea...


我想我可以尝试将节点格式化为数据绑定,取决于它的
深度?
I guess I could try to format the node as its databound, depending on its
depth?



这听起来确实应该有效......

That sounds like it should certainly work...


这篇关于在没有回发的情况下扩展树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆