simshp
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.
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>
Do you still need help on this ?
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank work with this ... thanks for replying