Custom Drag and Drop functions

I have a tree build upon three different content types: processes, subprocesses and activities
Users can build a tree an choose one of the types above.
There are some business rules involved:

  • processes cannot have processes as childs
  • processes can only have subprocesses as childs
  • subprocesses can have subprocesses as childs
  • activities can only be childs of subprocesses

When I activate drag and drop i want to use the rules above. When i use tree.setDragBehavior(“complex”) or tree.setDragBehavior(“complex-next”) it let’s me place activities under processes/

How can i achieve this?

You may use drag and drop event to cancel dropping items on other items. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … p_handling
docs.dhtmlx.com/doku.php?id=dhtm … s_handling