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

Don't allow parent tree inside a another parent tree to be dragged - kendo drag and drop treeview

1 Answer 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Krunal
Top achievements
Rank 1
Krunal asked on 24 Apr 2014, 06:18 AM
The first image is a dragging node image. I dragged the 'furniture'
parent node inside the 'storage' parent node. This dragged
successfully(see second image).

I don't want to allow this to happen. How can I prevent it?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 24 Apr 2014, 03:04 PM
Hi Vinit,

I already answered to this query in the support ticket you opened, but I will share my reply here as well:
You can use the drag event to check whether the dragged node has children or if it on the root level and based on that decide if dropping in into the other TreeView should be allowed. Here is an example how this could be achieved.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Krunal
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or