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

Drag and drop beetween rad tree view in on way

2 Answers 30 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kev
Top achievements
Rank 1
Kev asked on 16 Feb 2016, 04:23 PM

Hi,

It is possible to drag and drop nodes from one radtreeview to other but no having the ability to do the reverse.  furthermore i want to have the possibility to drag and drop between nodes just in the other radtreeview.

 

Example : RadTreeView1 -> just possibility to drag and drop in Radtreeview2

 

    

 

but not being able to do the reverse
but not being able to do the reverse
but not being able to do the reverse

2 Answers, 1 is accepted

Sort by
0
Kev
Top achievements
Rank 1
answered on 16 Feb 2016, 04:26 PM

And RadTreeview2 -> Just possibility to drap and drop between her nodes between them

 

Thanks a lot

0
Nencho
Telerik team
answered on 19 Feb 2016, 09:49 AM
Hello Kev,

Yes, you can achieve the desired functionality. Please refer to the following online demo, where the basics of the drag&drop between TreeViews and other elements is demonstrated.

http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/draganddropnodes/defaultcs.aspx

Regarding the need to disable the drag from the RadTreeView2 to RadTreeView1 - you can use the onNodeDropping client-side event. Then in you can get the ID of the source TreeView, using the sender.get_id(). and the destination, using dest.get_treeView().get_id(). If the attempt of draging is TreeView2->TreeView1 you can cancel the event, using the eventArguments:  args.set_cancel(true);

As for the Drag&Drop between nodes - you can use the property EnableDragAndDropBetweenNodes regarding the desired behavior for each TreeView.

Hope this information helps.

Regards,
Nencho
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
TreeView
Asked by
Kev
Top achievements
Rank 1
Answers by
Kev
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or