how to identify the root node,life node values in code behind

2 posts, 0 answers
  1. NA
    NA avatar
    39 posts
    Member since:
    Aug 2013

    Posted 03 Mar 2014 Link to this post

    how to identify the root node,life node values of Rad Drop down tree in code behind 
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Mar 2014 in reply to NA Link to this post

    Hi,

    Please try the following C# code snippet to identify the root node and leaf node of RadDropDownTree.

    C#:
    string[] child = new string[50];
    string[] parent = new string[50];
    int i = 0, j = 0;
    foreach (RadTreeNode node in RadDropDownTree1.EmbeddedTree.Nodes)
    {
        parent[j] = node.Text; //parent nodes
        j++;
        if (node.GetAllNodes().Count != 0)
        {
            foreach (RadTreeNode subnode in node.GetAllNodes())
            {
                child[i] = subnode.Text; // child nodes
                i++;
            }
        }
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top