Link to home
Start Free TrialLog in
Avatar of simshp
simshpFlag for Israel

asked on

Treeview keep subsection expanded

Hi all
I need to keep a subsection of a treenode expanded. ie On selecting a node I want to show all the sub nodes of this node and close all other nodes.  See Defn of treenode attached.
<asp:TreeView ID="TreeView1" PopulateNodesFromClient="true" ShowLines="true"
                ShowExpandCollapse="true"  ShowCheckBoxes="Leaf" runat="server">
            </asp:TreeView>

Open in new window

Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Do you still need help on this ?
Avatar of simshp

ASKER

Please ... would be great .. just getting to know this control
Sorry for the big delay but I think I have miss the notification email!

I was making some test with this problem because I use something like that. The problem is that the navigation fires before the selectednode event and you can not catch that. That way you never get the selected nod.

The solution for me was to create a "favorites" node always expanded but you can change the navigation action to the code on the selected node event and save it (before response.redirect to your target) on a session. Then you just have to expand it again.

jpaulino
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of simshp

ASKER

Thank work with this ... thanks for replying