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

raddropdowntree Disable node level

3 Answers 296 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Santosh
Top achievements
Rank 1
Santosh asked on 10 May 2014, 07:03 AM

 how to disabled raddropdowntree on particular node level .means i want my raddropdowntree level are configurable

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 May 2014, 05:24 AM
Hi Santhosh,

Please try the following C# code snippet to disable the particular level of nodes.

C#:
protected void raddroptreeDisableNode_NodeDataBound(object sender, DropDownTreeNodeDataBoundEventArguments e)
{
    foreach (RadTreeNode node in raddroptreeDisableNode.EmbeddedTree.Nodes)
    {
        if (node.Level != 1)
        {
            foreach (RadTreeNode subnode in node.GetAllNodes())
            {
                if (subnode.Level == 1)
                {
                    subnode.Enabled = false;
                }
            }
        }
    }
}

Thanks,
Shinu.
0
Santosh
Top achievements
Rank 1
answered on 13 May 2014, 11:33 AM
Hi In above code i am unable to find node.GetAllNodes() method  Please provide me alternative for that method
0
Shinu
Top achievements
Rank 2
answered on 14 May 2014, 06:28 AM
Hi Santhosh,

The EmbeddedTree property of a RadDropDownTree is used to get the value of the tree in the dropdown. It provides reference to the embedded tree and you can easily use all of the properties and methods that are exposed with the tree control. This property is  available from Q2 2013 SP1 release. Please upgrade to latest version if you are using older one.

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