onBeforeUpdate

fires before data sending

void onBeforeUpdate(string|number id,string state,object data){ ... };

Parameters

idstring|numberthe item's id
statestringthe item's state (operation type)
dataobjectdata that will be sent to the server side

Example

dp.attachEvent("onBeforeUpdate", function(id, state, data){
    //your code here
    return true;
});

Details

Event can be blocked. Returning false from event handler will prevent data sending.

Possible response statuses are the following:

  • updated;
  • inserted;
  • deleted;
  • invalid;
  • error.
Back to top