How to refresh the task grid after updating the task's sortorder

How to refresh the task grid to show the new order after updating the task’s sortorder field?
gantt.refreshData();
gantt.render();
These 2 methods do not work .

Hello,
Tasks do not have the sort order property. They have a temporary $index property that shows the row number regardless of the tree level. You need to use the moveTask method to move the task to a new vertical position:
https://docs.dhtmlx.com/gantt/api__gantt_movetask.html
Here is an example:
https://snippet.dhtmlx.com/5/36acc4c3

If you have a custom solution, it is hard to suggest what might be wrong as I don’t see your code.
In that case, please reproduce it in the snippet above, then click on the “Share” button and send me the link.