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

Node level of the entries

1 Answer 53 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Iulian Ilies
Top achievements
Rank 1
Iulian Ilies asked on 11 Jul 2013, 02:37 PM
Hi there,
Is there a way to find out what is the level of a particular entry or if there are no child entries for it.
My current understanding of the control is that the selection is preserved in the Entries collection and there is no tree-like connections between the items of this collection.
My goal is to extract only the selected leaves.
Thanks,
Iulian

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 16 Jul 2013, 10:25 AM
Hi Iulian,

By using the NodeDataBound event you can easily get reference to the level of the nodes in the following way:
var nodeLevel= e.DropDownTreeNode.Level;

Indeed, currently there is no way to get reference to the tree in the dropdown but with the upcoming Service Pack1 this week, we will introduce both client-side and server-side properties and methods that will allow access to the tree.  

I would also recommend that you take a look at this help article as I believe it would be helpful in your scenario - How to Pre-Select a Node Based on Text or Value.

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
DropDownTree
Asked by
Iulian Ilies
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or