Saving reordered table in database

Saving reordered table in database

ads32wads32w Posts: 5Questions: 2Answers: 0
edited April 2022 in RowReorder

My data in database table are ordered by Position(integer) column.
My backend is Flask. Html Table is created by Jinja engine.
How to update Position in database for all rows when row in table is reordered?
I tried
but I don't know how to send only information about reordered table by AJAX to flask endpoint. I tried diff .newPosiotion and oldPosition but it gives me only information about position in the table.


  • colincolin Posts: 15,140Questions: 1Answers: 2,586

    You would need a script on the server to update that column. Editor does this automatically - please see example here - so it would be worth considering that as a solution,


Sign In or Register to comment.