onBeforeTaskDisplay

fires after the tasks have been loaded to the Gantt chart, but before they are displayed

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

Example

gantt.attachEvent("onBeforeTaskDisplay", function(id, task){
    if (task.priority == "high"){
        return true;
    }
    return false;
});

Details

The event is blockable. Returning false will prevent the task from being displayed

See also
Back to top