Treeview selected Node

V

Vikram

Hi,

I am using Asp.net 2.0 treeview control.Tree is having 2-3 level of
hirearechy. I want to show current selected node as expanded when the page
reloads or postback. How can I do that?

Thanks
 
L

Ladislav Mrnka

Hi Vikram,

try to set SelectAction in your nodes to Expand. Be aware of impact on
TreeView functionality. Changing SelectAction can affect which events are
fired when user click on node. For expand mode it will not fire
SelectedNodeChanged any more.

You can also handle SelectedNodeChanged, collapse all nodes and then expand
only selected node if you want to.

Regards,
Ladislav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top