Index of a child note

2 posts, 1 answers
  1. Mehrdad
    Mehrdad avatar
    9 posts
    Member since:
    Mar 2009

    Posted 09 Mar 2009 Link to this post

    How can I find out index of the selected node in the childeren of anothr node?
    I have  a tree a root and others are childeren. I want to find the index of the selected childeren
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Mar 2009 Link to this post

    Hello Mehrdad,

    Try the following code snippet to find out the index of selected node in RadTreeView.

    protected void Button2_Click(object sender, EventArgs e)  
        if (RadTreeView1.SelectedNodes.Count>0) // Checking whether, node is selected  
            int index = RadTreeView1.SelectedNode.Index; //Get the Index  
            int level = RadTreeView1.SelectedNode.Level; // Get the level  

    I hope the link to online documentation which explains about Working with Nodes in Server-Side Code will help you.

Back to Top