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?
These 2 methods do not work .

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:
Here is an example:

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.