onBeforeDelete

fires before an item is removed

boolean onBeforeDelete(string|number id){ ... };

Parameters

idstring|numberthe ID of the item

Returns

booleanreturning false will prevent the item from being removed

Example

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

Details

In case of Tree and TreeTable - event will be called only for item which is deleted, and will not be called for its childs

See also
Back to top