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

How to prevent the item drag n drop from one node to another

3 Answers 326 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
developer
Top achievements
Rank 1
developer asked on 18 Jul 2016, 09:16 AM

Hi,

I'm working on drag and drop the node item with in the same node. It is working as expected. But it allows to drag and drop the child item from one node to another. It should be prevented.

Dojo Example

Appreciate your support to fix the issue.

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
developer
Top achievements
Rank 1
answered on 18 Jul 2016, 09:30 AM

In this screenshot. The last step should not happen. i.e. moving the SubItem to the Item level.

0
Alex Gyoshev
Telerik team
answered on 20 Jul 2016, 06:28 AM

See the how-to help topic on disallowing drag to deep levels. You can change the condition in the drag event handler, so that other levels will not be handled. This will ensure the best UX, as the drag indicator will show that the drag is forbidden.

Regards,
Alex Gyoshev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
developer
Top achievements
Rank 1
answered on 20 Jul 2016, 10:34 AM

Thank you for the response Alex.

In my case, there will be "n" levels of tree. so, the item which I've selected should move only with the node. not outside. it may be upside or down.

Check this stackoverflow thread.

Tags
TreeView
Asked by
developer
Top achievements
Rank 1
Answers by
developer
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or