DHXTree Item Movement along with Data Processor

Hi ,



I am using multiple items movement in one shot usng loop…



var list=[ …array of ids … ];

for (var i=0; i<list.length; i++){

tree.moveItem(list[i],…

myDataProcessor.serverPorcess=“url…”

}



and after the loop i send data using

myDataProcessor.sendData();





this generate no of requests and fired them at once…



this is not working as manual update funcationality is working in DataGrid (ie second request will be fired after the completion of First).



How to implement that?







In case of dhtmlxtree the updates has more complex logic, because tree need to maintain correct hierarchy - child items may be updated only after parent ones updated , so dataProcessor allows data saving only one-by-one, without possibility to do all-at-once saving.


myDataProcessor.setUpdateMode(“off”)

var list=[ …array of ids … ];

for (var i=0; i<list.length; i++){

    tree.moveItem(list[i],…

    myDataProcessor.setUpdated(list[i],true);
}


myDataProcessor.sendData();