locked
change row order in a table RRS feed

  • Question

  • Assume that I have a table with 3 rows. I would like to change the order as follows:

    old   new

    0 -> 1

    1 -> 0

    2 -> 2

    How do I do it?

    I tried to store the rows in an array list, then change their order, then remove the rows from the table, then insert them from the array list into the table with the new order, but what I found was that once I delete them from the table, they are also deleted from the array list.

    If I do not delete them I can't insert a row that already exists into a table.

     

    Thanks a lot for any help.

    Thursday, October 5, 2006 9:29 PM