Skip to content

onBeforeDelete

fires before an item is removed

function onBeforeDelete(
// the ID of the item
id: string|number
): boolean

boolean returning false will prevent the item from being removed

grid.data.attachEvent("onBeforeDelete", function(id){
//... some code here ...
// return false to block operation
return true;
});

Returning false from the event handler will block further processing, and the item will not be deleted.