Currently all my data is being bound through a custom Hierarchy class, I'm having a bit of trouble expanding the structure to make the node I want visible... well... visible. I attempted to use MyTreeView.Nodes(MyIndex).Expanded = True directly after calling MyTreeView.DataBind() but it keeps telling me the index is out of range... but I'm fairly certain it is not. How would one go about expanding a single node of a TreeView without building it from scratch node by node.
* My Bad, I forgot the Node structure was recursive. So I really needed to be working off MyTreeView.Nodes(0). I worked up a little code to get the results I needed, where "selected" is a string value for the text associated with the node I want to expand to:
Dim Node as RadTreeNode
Node = rtvHierarchy.FindNodeByText(selected)
Node.Selected = True
Node = Node.ParentNode
do while not (Node is Nothing)
Node.Expanded = True
Node = Node.ParentNode
loop
* My Bad, I forgot the Node structure was recursive. So I really needed to be working off MyTreeView.Nodes(0). I worked up a little code to get the results I needed, where "selected" is a string value for the text associated with the node I want to expand to:
Dim Node as RadTreeNode
Node = rtvHierarchy.FindNodeByText(selected)
Node.Selected = True
Node = Node.ParentNode
do while not (Node is Nothing)
Node.Expanded = True
Node = Node.ParentNode
loop