Drag and Drop Treetable Advanced Function

Hello webix team,

I still can’t understand properly how to use advanced drag and drop function.

Here I have some treetable http://webix.com/snippet/3262f655

Firstly, How to disable drop to the third treetable from the first treetable, but It still can recieve drop form the second treetable?

Second, How to restrain drop as root, so all drop should be child of root?

Thank you

Use onBeforeDragIn event and just block unwanted drag attempts.

http://webix.com/snippet/0a352be3

Thank you maxim, It works perfectly.

For the second question, I read here http://docs.webix.com/desktop__dnd_hierarchy.html but it didn’t do quietly what I wanted. How to know if it will dropped as root?

Check onBeforeDrop handler in the next snippet

http://webix.com/snippet/b1a2e771

It changes the target of drag-n-drop, so new item is always a child of “root”

Nicely done, Maksim. Thank you very much for the answer.