Is there a way to gantt.parse updated json into the gantt chart and keep the status of open/close of parent tasks?
In other words, preserve the tree status on data refresh?
Is there a way to gantt.parse updated json into the gantt chart and keep the status of open/close of parent tasks?
In other words, preserve the tree status on data refresh?
Well I opted to store the id of the task onTaskOpened
in localstorage, send that to the server when retrieving updated tasks and set open:true
for that specific task in the returned json
Hello,
It happens if you parse the tasks that were in the chart before the parse (or if their IDs match). If you parse other tasks, it won’t affect existing tasks:
http://snippet.dhtmlx.com/5/d0b97aad4
As a workaround, you can use onBeforeParse
event handler to save the IDs of the open tasks in an array. After parsing the data you open the tasks from the array:
http://snippet.dhtmlx.com/5/c2d218e6a