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

Forum statistics

Threads
474,262
Messages
2,571,043
Members
48,769
Latest member
Clifft

Latest Threads

Top