Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Move row up and down with a button

I was wondering if there is a method that is able to move a selected row up or down. I searched through the methods on the wiki, but couldn't find a suitable one. Currently we're extracting the whole list, then remove the selected record, and insert it at it's new position.

I think this is functionality that others may wish for too, so maybe I am missing something.

Comments

  • edited December 2016
    There is no single method that will accomplish what you are asking for. However, I think you can accomplish this without resorting to extracting the whole list. You could use the RecordData property to get the data of the row you intend to delete, use the DeleteRecords method to remove the row, and then use the INSERT method to put in the new data. If you wanted to improve the visual effect, use the Redraw property so the user only sees the end result. Many developers create their own utility specifically to manage common SRP EditTable operations. This functionality could fit very nicely in such a utility.
Sign In or Register to comment.