dhtmlxtree enableMercyDrag + dhtmlxdataprocessor question

Hello,



I’m using dhtmlxtree 1.6 pro version, when I copy a not empty node with mercydrag e.g. this node have 3 children, i get a 4 ajax request to server from dhtmlxdataprocessor 1- root node, 2,3,4 - subnodes(children). On the server side i use PEAR NestedSet library so i need only one request for handle it - only root node without children. Please advise is it possible to force dhtmlxdataprocessor to make only one request with main node only or recommend some other solution.



Thank you.

Regards,

Alexander.


Hello,


you can try to use the following approach


tree.attachEvent(“onDrag”,function(sid,tid){
dp.setUpdateMode(“off”);
return true
})
tree.attachEvent(“onDrop”,function(sid,tid){
for(var i = dp.updatedRows.length-1; i>=0 ; i–){
if(dp.updatedRows[i]!=sid) dp.setUpdated(dp.updatedRows[i],false)
}
dp.setUpdateMode(“cell”);
})
Here dp is dataprocessor object. This approach deletes child nodes from “updated” array - so, only parent is send to the server.


Thank you much!