Hello Christopher,
My experience with the Treeview would say that you need to manage the state
of the nodes yourself and that Treeview.FindNode() is your friend:
// Function to collapse all the nodes of a treeview control but the given
parameter
protected void ExpandNode(string expandThisNode)
{
foreach (TreeNode tn in myTreevie.Nodes)
{
tn.Collapse();
}
TreeNode tnExpandThisNode = tvPhoto.FindNode((string)expandThisNode);
tnExpandThisNode.Expand();
}
--
brians
http://www.limbertech.com
"ch***************@gmail.com" wrote:
Howdy folks. Would anyone care to suggest a way to have sibling nodes
(at the same level) collapse when a node is expanded in an asp.net 2.0
treeview control? What I mean is that I want only one subtree to be
open at a time. Can the treeview control do this by itself or is some
fiddeling required?
Regards,
Lantz