gantt.sort - How to reset sorting

Hi,

I want to integrate a button which resets to the original screen order of the tasks after hit. Sorting is done by gantt.sort(‘id’, true/ false);. I already tried to perform a gantt.config.sort = false; followed by a gantt.parse(data); but this has no effect on the sorting. The reordered task order stays like it is.

The order in the original data array did not change, so what is wrong?

Best!

Andy

Hi,
When you set “gantt.config.sort = false”, you just disable sorting.

To reset to the original task order, you need to remove the sorted ones by clearAll() and load them again.
docs.dhtmlx.com/gantt/api__gantt_clearall.html