How to re-arrange table row?

Hello,
I want to rearrange rows in item table in sales order after saving. For example, I want to rearrange the rows ordered by size or something like that.
I have tried directly change field value, but it didn’t seem to work.
How can I achieve this?

not of the box you will need to write the custom script to change the row order on validate method

Though you can change the field order via manual drag and drop functionality.