onLightboxDelete

fires when the user clicks on the 'Delete' button in the lightbox

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

Parameters

idstring|numberthe task id (the task opened in the lightbox)

Returns

booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onLightboxDelete", function(id){
    var task = gantt.getTask(id);
    if (task.duration > 60){
        alert("The duration is too long. Please, try again");
        return false;
    }
    return true;
})

Details

The event is blockable. Return false to cancel the 'delete' operation and keep the lightbox open.

See also
Back to top