custom nested lists and getting level and parent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Norris
    New Member
    • Apr 2010
    • 1

    #1

    custom nested lists and getting level and parent

    Hi everyone ! In first sorry for my bad english, I'm french.

    I try to make a custom TreeView and a custom TreeNode. For storing child nodes in my customTreeNode, I use a List(Of MyTreeNode).
    I discovered recently the recursivity and I can looking for child nodes in a node.

    My problem is to get the level of the current node, or getting the parent node of the current one.
    I think that these two properties are in close relation, but I don't understand how the real TreeNode manages to inform this "level" property right after having added nodes in TreeNodeCollect ion.

    So, is there a recursive way for going up in the parent for nested lists in general ?

    Thank you in advance for your councils.
Working...