469,613 Members | 1,284 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Get a TreeNode reference to the root node in a TreeView

I'm doing a recursive function that receives a TreeNode object. It's
traversing an XMLDocument and putting the data in a TreeView. The problem is
that to start out, I only have a TreeView object. So to add nodes in the
beginning, I have to call

TreeView.Nodes.Add()

But for everything but the top level, I call

TreeNode.Nodes.Add()

It would make my life much easier if I could get a TreeNode reference to the
root node in my TreeView. Is this possible or do I have to completely redo my
logic?
Nov 17 '05 #1
2 2369
I got around this by using a new TreeNode and after I populated the TreeNode
I added it's Nodes to TreeNode.Nodes.
Nov 17 '05 #2
I got around this by using a new TreeNode and after I populated the TreeNode
I added it's Nodes to TreeNode.Nodes.
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jeroen Ceuppens | last post: by
2 posts views Thread by pei_world | last post: by
5 posts views Thread by nevin | last post: by
6 posts views Thread by Craig Lister | last post: by
4 posts views Thread by Rob Stevens | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.