Treegrid - server side validation on drag'n'drop

Hello!

Im implementing dnd functionality in treegrid with dataprocessor (dhtmlx 2.5 pro). Everything works great except that i need to do some drop validation on server side.
Dataprocessor send update request to server (!nativeeditor_status=updated) but how server can return error message and cancel dnd operation? I’ve tryed to return xml like this:

  1. Error message
  2. Error message
  3. Error message
  4. Error message

but neither works :frowning:

In case of error server should return

<data> <action type="my_error" sid="id" tid="id">Error message</action> </data>

The row marked as error will be highlighted in the grid. And it will not be sent back to the server until one of the next events occurs:

  1. A user edits data in a row;
  2. Rows set back to updated status through setUpdated() command.

Cancelling dnd operation in case of error require a bit more customization. You can use defineAction() method to catch when server returns “error” action type, delete row from target grid and add grid to source grid.

[code]
Details

function my_action(node){
alert(node.getAttribute(“type”)); // my_error
alert(node.firstChild.data); // Details
return false;
}[/code]