onBeforeDataSend

called before sending data to server side

void onBeforeDataSend(object details);
detailsobjectobject with data details (see below)

Example

dp.attachEvent("onBeforeDataSend", function(details){
    //... some code here ... 
});

Details

The event parameter, details, consists of:

  • data (object) - data object;
  • id (string, number) - ID of a data item on client side;
  • operation (string) - operation name ("update, "insert", "delete"););

and looks like:

{
    id:5,
    operation:"update",
    data:{
        id:5, 
        title:"The Godfather",
        rating:"9.2"
    }
 
}

Note that returning false from the event handler will suppress request to the server:

const processor = webix.dp("$datatable1");
  processor.attachEvent("onBeforeDataSend", () => {
    // cancel server request
    return false;
  })

Related sample:  DataProcessor: Canceling Server Request

See also
Back to top