Drag and drop multiple tree nodes

Hi,

We use dhtmlx professional v3.0 for our application. We have 2 dhtmlxTree trees with dataProcessor on one page. The multiselection is turned on by:

tree.enableMultiselection(1,1);

When we drag and drop multiple nodes/selections from one tree to another, multiple drag are drop events, one for each node, are triggered and multiple requests, one for each node, are sent by dataProcessor. This causes lots of round trip traffic to server, and sometime those requests conflict or step on each other. Is there anyway/setting to make “drag and drop of multiple selections” one group tree event and triggers one dataProcessor request (with info from all nodes) to server?

Thanks a lot,
Bao

Hello,

you will need to disable automatic data sending and enable mode that sends all changes in one request:
dp.setUpdateMode(“off”);
dp.setTransactionMode(“POST”,true);

docs.dhtmlx.com/doku.php?id=dhtm … ialization
docs.dhtmlx.com/doku.php?id=dhtm … nfig_debug

sendData() method of DP should be called when the last selected item is dropped:

var lastSelected = ""; tree.attachEvent("onBeforeDrag",function(id){ var list = tree.getSelectedItemId(); if(list) lastSelected = list.split(",").pop(); return true }); tree.attachEvent("onDrop", function(id){ if(id == lastSelected){ myDataProcessor.sendData(); } })