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

Drag and Drop between Nodes

2 Answers 95 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 18 Nov 2008, 02:21 PM
Hello

I am finding some difficulty with the drag and drop of nodes in the treeview.

I got a treeview with many number of nodes in different levels and I have enabled the properties for drag and drop in the treeview. To restrict some nodes order(position) not to change in the treeview, for those nodes I have set the allowdrop and allowdrag property to false. The problem is eventhough I set the property to false, it allows to drop in between the nodes so I could not make some nodes position to be same(static) always. Whereas this works for the older version of radControls(before prometheus).

Could you help me in this?

Thank you.

2 Answers, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 20 Nov 2008, 06:53 PM
Hello Mark Leeds,

Setting AllowDrop to false of a Node will prevent other Nodes to be dropped onto it. Dropping between Nodes is not controlled in such a way.

However, you can hook to the OnClientNodeDropping event of the TreeView and depending on the drop position, the destination Node and its AllowDrop property you can cancel the event. In this way, you can achieve the desired functionality.

Please see these help articles for more information:
Kind regards,
Simon
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alan
Top achievements
Rank 1
answered on 21 Nov 2008, 08:02 AM
Hello Simon

It works great..

Thank you
Tags
TreeView
Asked by
Alan
Top achievements
Rank 1
Answers by
Simon
Telerik team
Alan
Top achievements
Rank 1
Share this question
or