How To Find No. Of Parent Nodes of a Selected Node in a TreeView

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rekhaiwaves
    New Member
    • Aug 2006
    • 2

    How To Find No. Of Parent Nodes of a Selected Node in a TreeView

    Hi ,

    I m using a treeview , in which ,based upon the level of the node i need to show the context menu.But I m not able to find the level of the node. i.e the no. Of Parent node. Pls help me on this.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I'm not a .net expert but in .net Version 2 I think you can use

    TreeView::Selec tedNode to get a TreeNode class for the currently selected node

    and then

    TreeNode::Depth to get the depth of the current node in the tree

    Comment

    Working...