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

prevent drag and drop within parent node

1 Answer 389 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Guna
Top achievements
Rank 1
Guna asked on 12 Apr 2011, 11:40 AM
hi telerik team,
                 i am using radtreeview which is very useful for me in my current project, but, i need a help to accomplish it successfully ....
i have populated the tree view from a dataset. there will be more number of parent nodes and within each parent node, more than one child nodes will be there. Now i have to restrict the user to drag and drop the child nodes within the parent node itself. (Meaning : User should not interchange a child node from one parent node to another parent node. they should interchange or arrange a child node within its parent node itself). i dont have any idea about doing this in the tree view, so pls help me as soon as possible.


Thanks,
 Guna

1 Answer, 1 is accepted

Sort by
0
Sonya L
Top achievements
Rank 1
answered on 12 Apr 2011, 04:16 PM
Guna ,
You could try handling the DragEnding event of the treeview, and compare the parent of e.Node and e.TargetNode.  If they are different, you could set e.Cancel =  true to cancel the drag-drop.

Sonya
Tags
Treeview
Asked by
Guna
Top achievements
Rank 1
Answers by
Sonya L
Top achievements
Rank 1
Share this question
or