Categories | Question details Back To List | ||
Stanislav, posted: Jan 25, 2008 16:03 | Direct link: http://www.dhtmlx.com/docs/products/kb/index.php?s=normal& ... Stanislav, posted: Jan 25, 2008 16:03 | Direct link: index.php?s=normal&q=1893&a=2257 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(); This logic is not working , In this only last request is send back to the server...... Answer posted by Support on Jan 29, 2008 07:23 There is one small mistake in sample above , the correct code is 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.setUpdateMode("cell"); //reenable auto-updates myDataProcessor.sendData(); If it still causing problem for you - please contact us directly at support@dhtmlx.com - we will provide some kind of working sample. |