dhtmlxTree and dhtmlxDataprocessor


How would one go with the autoupdating when we have two trees en nodes are dragged from one tree to another?

I tried with two different instances of dataprocessor, one for each tree. They work as long as you don’t drag out of the tree.

I don’t however see a way to keep things autosynced with the database when I drag something from one tree to the other.

Commands like deleteItem and insertNewChild don’t work using the onDrop event.
Deleteitem fails as the item is not in the original tree anymore
InsertNewChild inserts a child, but then we have the item twice in the destination tree

Anyone can help here?


you may define onDrag event handler and deny the drag-n-drop from it. This handler can call deleteItem and insertNewChild instead:


function doOnDrag(sid,tid,bid,stree,ttree){
return false;
return true