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

Drag Drop between two RadTreeView

1 Answer 98 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Aug 2009, 05:15 PM
I have two RadTreeview and was wondering after drag drop one node to the other can I still keep that nope available after the drop.  Every time it gets removed even if I dont add .Owner.Nodes.Remove.  

Also, is there a way to validate (customvalidator) to make sure that the node getting brought over is not the same as another node that is already in the node list?



 

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 20 Aug 2009, 01:45 PM
Hi Robert,

When you add the node to the Nodes collection of the destination treeview it is automatically removed from the Nodes collection of the source treeview. To overcome that - do not add the node to the Nodes collection, but add a copy of the node to the Nodes collection:

destNode.Nodes.Add(sourceNode.Clone());

The node drop events will not fire if you try to drag a child node onto its parent.

Sincerely yours,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or