If I use the + to insert a task, the ID that gets generated is a numeric and is not enclosed in double quotes so when I pull the JSON off the gantt and stringify it, I get that numeric only value and that screws up the parser I am sending that to… How best can I update the ID there? I am already creating a shadow ID called Order to be used for something else and I do that in the beforerender. If I try to modify ID in the eachTask it seems to generate an error.
So how best can I override this there? Here is current gen of order
To solve the issue please add this code before gantt configurations:
var uid = gantt.uid;
gantt.uid = function(){
return uid() + "";
}; Here is an example how it works.
Now new task has string id, please check the screenshot.
Hello Subri,
Gantt doesn’t add the strict check for IDs as in some places you can use String types, in other places, you can use Number types.
The ID can have the Number or String type.