Like to know is there any difference between calling
Both achieve the same end state, both has its own event. e.g
onAfterTaskAdd and so on.
Currently, I only can think that
parse can parse
addTask is slower because need to add one by one?
The main difference between the methods is that
gantt.parse() doesn’t add the tasks on the server side. You can load any number of tasks with the
gantt.parse() method, but when you reload the page, you won’t see those tasks.
But if I am not using
dataProcessor then there is basically no difference?
parse, I can initialize my initial data set with
addLink, probably use for after the initial data set has been loaded with
There isn’t a API that
In that case, the methods are very similar, except for the following things.
addTask() method allows modifying the data on-fly. For example, you can redefine the parent. And specify the index parameter to set the position that the new task will take.
In the following example, you can see that Task #11 can be located at the bottom of the list (parse) or in between Task #1 and #2(addTask):
parse() method allows loading the data from an XML file.
And yes, it is possible to load tasks and links when using the
There isn’t a API that addTaskAndLink right?
There is no public API method like addTaskAndLink.
Thanks for the explanation.