onBeforeUpdate

fires before updating a record (records)

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

The event fires for each updating record and before onBeforeDataSending.

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

Possible response statuses are the following:

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