Hi support,
I am using gantt.deleteTask method to delete tasks in Gantt. In my senario I want to update custom property called sortOrder after delete parent task with children.
for this purpose I used
gantt.attachEvent(“onAfterTaskDelete”, function(id:string,item:GanttTaskInfo){
//update the order of tasks
gantt.batchUpdate(function () {
gantt.eachTask(function (item: any) {
item.sort_order = item.$index + 1;
gantt.updateTask(item.id, item);
})
},null)
but at the time is event in calling , the deleted task also taking to account. then remaining tasks sortorder is not correct.
Can you please let me know how i update remaining tasks sort order.
Thanks.
Rasagb