Skip to main content

eachSelectedTask

Description

Iterates over all selected tasks in the Gantt chart

eachSelectedTask: (code: GanttCallback) => void

Parameters

  • code - (required) function - a function that will iterate over tasks. Takes a task id as a parameter

Example

gantt.batchUpdate(function () {
gantt.eachSelectedTask(function(task_id){
if(gantt.isTaskExists(task_id))
gantt.deleteTask(task_id);
});
});

Details

note

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.