onBeforeTaskDisplay

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

boolean onBeforeTaskDisplay(string|number id,Task task);
idstring|numberthe task id
taskTaskthe 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