checks whether the specified task is currently selected

boolean isSelectedTask(string | number task);
taskstring | numberthe task's id
boolean'true' if the specified task is currently selected, otherwise - 'false'


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

Related samples


This method is defined in the multiselect extension, so you need to activate the multiselect plugin. Read the details in the Multi-Task Selection article.

See also
Back to top