eachSelectedTask

iterates over all selected tasks in the Gantt chart

void eachSelectedTask(function code);

Parameters

codefunctiona 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

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