I have recently by-passed this problem in my own code.
I allow the user to build a play-list for a simple MP3 player. Usually a new item would go on the end, but the user might want to promote it to earlier in the sequence. So I added a numeric sort column to the table (which could be invisible). Then to move a column up or down the value of the sort cell is exchanged with the one above or below it (respectively).
This is more complicated to program, but offers more flexibility.
I hope this helps, Mike.