Redth
Jun 24th, 2003, 01:21 PM
Hey guys,
I recently started using the Microsoft TreeView Control in my pages. Actually i'm sort of using it in a Custom User Control as a base control. I'm having a few issues with it though:
1) - There is no .EnsureVisible method of nodes or anything to make sure that all the proper parents are expanded so that the user can actually see a certain node...
2) - I can't set the selectedNode to a node that isn't visible to the user. It gives an error stating that the node must be visible in order to be selected.
3) - This is my biggest problem right now... I can't seem to find a way to Loop through ALL the nodes in a treeview. When i go through the collections of myTreeView.Nodes I only get the top level nodes returned.
I know that to get the children nodes of a node you must do something like: MyNode.Nodes collection...
So, i'm having a big mental block and can't seem to come up with a function that would loop through all nodes, their children, their children's children, and so forth for an unlimited amount of node levels. Can anyone help me out here with this function?
Thanks guys...
I recently started using the Microsoft TreeView Control in my pages. Actually i'm sort of using it in a Custom User Control as a base control. I'm having a few issues with it though:
1) - There is no .EnsureVisible method of nodes or anything to make sure that all the proper parents are expanded so that the user can actually see a certain node...
2) - I can't set the selectedNode to a node that isn't visible to the user. It gives an error stating that the node must be visible in order to be selected.
3) - This is my biggest problem right now... I can't seem to find a way to Loop through ALL the nodes in a treeview. When i go through the collections of myTreeView.Nodes I only get the top level nodes returned.
I know that to get the children nodes of a node you must do something like: MyNode.Nodes collection...
So, i'm having a big mental block and can't seem to come up with a function that would loop through all nodes, their children, their children's children, and so forth for an unlimited amount of node levels. Can anyone help me out here with this function?
Thanks guys...