This is a migrated thread and some comments may be shown as answers.

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

1 Answer 53 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
NA
Top achievements
Rank 1
NA asked on 03 Mar 2014, 08:00 AM
how to identify the root node,life node values of Rad Drop down tree in code behind 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2014, 09:25 AM
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.
Tags
DropDownTree
Asked by
NA
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or