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

how to get the Root node,child node selected value at a time server said code behind

1 Answer 192 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
NA
Top achievements
Rank 1
NA asked on 22 Jan 2014, 12:11 PM
I want Root node , child node only  selected value's individual [ with out array format & check box] of Rad drop down tree  server said code
pleas help me...



1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jan 2014, 03:12 AM
Hi,

Please have a look into the following C# code to get the Root nodes, Child Nodes and SelectedValue of RadDropDownTree in RadButton OnClick event.

C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    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;
        j++;
        if (node.GetAllNodes().Count != 0)
        {
            foreach (RadTreeNode subnode in node.GetAllNodes())
            {
                child[i] = subnode.Text;
                i++;
            }
        }
    }
    string Selectedtext = RadDropDownTree1.SelectedText;
    string Selectedvalue = RadDropDownTree1.SelectedValue;
}

Thanks,
Princy.
Tags
DropDownTree
Asked by
NA
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or