onBeforeSplitTaskDisplay

fires before a part of the split task is displayed on the Gantt chart

boolean onBeforeSplitTaskDisplay(number|string id,object task,object parent);
idnumber|stringthe id of the subtask
taskobjectthe object of the subtask
parentobjectthe object of the parent task
booleandefines whether the subtask of the split task will be displayed on the page (true) or not (false)

Example

gantt.attachEvent("onBeforeSplitTaskDisplay", function (id, task, parent) {
    if (task.duration < 3) {
        return false;
    }
    return true;
});

Details

split tasks

When the split task is rendered, firstly the onBeforeTaskDisplay event is fired for the parent item (a task with render:"split"). Then "onBeforeSplitTaskDisplay" is fired for its every subtask. Returning false from "onBeforeSplitTaskDisplay" prevents a subtask from being displayed.

Related sample:  Filter split tasks

See also
  • Articles
  • Change log

    added in v8.0

    Back to top