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);
});
});
Related samples
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.
Related API
- eachTask
- getLastSelectedTask
- getLastSelectedTask
- multiselect
- multiselect_one_level
- isSelectedTask
- toggleTaskSelection
- batchUpdate