Hello, i have one problem.
When i create a task, i use the event “onTaskSelected” to put the id in a variable, but when i use the variable it is a stange value and says the error “Task not found id=1567010936864”. When i edit the id is correct and i dont have any problem.
I must have this id when the task is selected and it works in any other task, only fails when the task is created and the gantt is not updated/refreshed.
Is there any event that returns the correct variable? or any way to update id on gantt? or refresh the gantt?
Thank you.
Hello,
Unfortunately, I couldn’t reproduce the issue. After creating a task, the task is selected and the variable has the correct value so it is possible to find the task:
http://snippet.dhtmlx.com/6d0d4d68b
However, when you create a task via the “+” button or the createTask
function, Gantt creates a temporary task with the ID1. After you click on the “Save” button, Gantt deletes the temporary task with the ID1 and creates a new task with the ID2. That might explain that you cannot find the task that doesn’t exist if you apply the code immediately after adding a task.
But I don’t see your code, so I cannot suggest you what you need to change to make it work correctly.
i found a error on my code. Everything is ok now.
thank you.