onBeforeTaskDelete

fires before the user deletes a task

boolean onBeforeTaskDelete(string|number id,object item);
idstring|numberthe task id
itemobjectthe task object
booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onBeforeTaskDelete", function(id,item){
    //any custom logic here
    return true;
});

Details

The event is blockable. Return false to cancel deleting of the task.

See also
Back to top