Couldn't save records after re-order/dragging tasks?

I used order_brunch to re-order/drag&drop my tasks. But it didn’t save after re-ordering my updated tasks. I used onAfterTaskAdd, onAfterTaskUpdate used for updating my tasks. But it didn’t save when I re-order m y tasks.
Which will be great to use my re-ordering tasks?

Do you have any example for onAfterTaskMove? How can I get parent, tindex.

Do you have a column in the database that stores the order?
Our guides describe how to implement that. Here are the examples:

Hi Ramil, No i don’t have any column individually only for storing orders. But the task id works pretty much like orders. Also I sorting task according to Id’s. Now I want to save the new order task in Angular. If I add new column for only ordering tasks : how can I manipulate from angular?
gantt.attachEvent(‘onAfterTaskMove’, function(id, parent, tindex) {


Thank you for the clarification.
The ID itself doesn’t mean the order position. If you reorder a task, its vertical position will change, but the ID will remain the same. After you reorder a task, Gantt should send the changes to the server side. Here is a video demonstrating it:

If you really rely on the task ID to reorder tasks and sort tasks by ID after loading the data, that explains why the order is not saved, because sorting reset the order by the ID. If you update the task IDs after reordering it, you might encounter various issues. For example, Gantt uses the task ID to create links, save task under a parent and other things. So it is better to create an additional column in the database table to store the order of tasks.

If I add new column for only ordering tasks : how can I manipulate from angular?

Please clarify what exactly you want to do.

Hi Ramil, Thanks a lot. I already create a new column.
My application is font end angular and back-end .net core.
Do I need to use gantt.attachEvent(‘onAfterTaskMove’, function(id, task, tindex) {)
In angular? And if I’m using ‘onTaskMove’ do I need to send id, task and tindex to save?

Thank you for the clarification. Usually, you don’t need to use that event handler to send the changes to the backend after vertically reordering tasks. You need it only if you use a custom way to detect that something changed in the chart. If you use the Data Processor, it should detect the changes and send them to the server side: