Hi,
I need to add functionality that will allow my users to choose between various types of data and then send their choice to a web service, returning the relevant set of tasks to populate the gantt with. For this, I need to remove all tasks from the gantt before populating it with the new ones.
I tried the following approaches:
dp.tasks.list.forEach(function (task) {
dp.tasks.remove(new DayPilot.Task(task));
});
dp.tasks.list.forEach(function (task) {
dp.tasks.remove(task);
});
But both did not work. I also tried iterating the tasks.list but its length doesn’t register for some reason and its elements are not Task objects anyway.
I’d appreciate some help.