onBeforeTaskMultiSelect

fires before the task selection state is being changed (the task is being selected or unselected)

void onBeforeTaskMultiSelect(string|number id,boolean state,Event e){ ... };

Parameters

idstring|numberthe id of a task
statebooleantrue if the task is going to be selected, false - if unselected
eEventa native event object

Example

gantt.attachEvent("onBeforeTaskMultiSelect", function(id, state, e){
    // some logic here
     return true;
});

Details

This event is defined in the ext/dhtmlxgantt_multiselect.js extension, so you need to include it on the page. Read the details in the Multi-Task Selection article.

The event is called for each task of the range.

The event is blockable, returning false will cancel the change of the task selection state.

See also
Back to top