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

How to get destination node when Drop on the root

1 Answer 75 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hamdy
Top achievements
Rank 1
Hamdy asked on 03 Aug 2010, 11:59 AM
I have treeview
I am dropping a node to the root (no parent)
   var destinationNode = args.get_destNode();

 destinationNode has value and not a null
but
 destinationNode.get_nodes().get_count() is equal zero
how this make sense

I want to do some validation before dropping so i wamt to know the children of the parent node
in my case the parent should be null (as it is a root)

to avoid this problem I will check the level and if it is zero I will check all the root noed but who can I get them?

1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 05 Aug 2010, 02:20 PM
Hi Hamdy Ghanem,

In the ticket info I see you are using the latest version 2010.2 713. There is a new property called get_allNodes(). When called from a node it will return all child nodes of a node. You can use it to find all the child nodes of the root node and then check the level of each of them as you want.

Please let me know if this helps. 

Greetings,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Hamdy
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or