isSelectedTask

checks whether the specified task is currently selected

boolean isSelectedTask(string|number task);

Parameters

taskstring|numberthe task's id

Returns

boolean'true' if the specified task is currently selected, otherwise - 'false'

Example

gantt.templates.task_class = 
gantt.templates.grid_row_class = 
gantt.templates.task_row_class = function (start, end, task) {
    if (gantt.isSelectedTask(task.id))
        return "gantt_selected";
};

Related samples

Details

This method 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.

See also
Back to top