Persist the expanded/collapsed state of tasks

I am using gantt chart and from api, i am sending either a milestones should be open or close, basically on default case, I am sending all milestone as collapsed one,

now when I update, it is again sending as collapsed, is there someway by which i could keep all those old task which were open as open?

Hello,
When you load the data, Gantt checks the open parameter to define if a task should be opened or not:
Task Properties Gantt Docs).-,open,-boolean

So, you will need to save that property for each task on the server.

If you want to load all tasks in the opened state, you can enable the open_tree_initially config:
https://docs.dhtmlx.com/gantt/api__gantt_open_tree_initially_config.html

Please note that the open property has a higher priority that the open_tree_initially config. So, the tasks with the open: false won’t be opened if you enable the open_tree_initially config.

You can check how it works in the following snippet:
https://snippet.dhtmlx.com/bkpj3pd1