Solution for model row sorting and saving sort order back to db

I’m looking for a good snippet or article that will help me implement the ability to save the sort order of a data table in admin view back to the database. Any suggestions are appreciated.

Also suggestion about what type of sort to use, ie. bubble, insertion, select, etc.

maybe http://www.yiiframework.com/extension/jqgrid/

You may use this http://www.webresourcesdepot.com/dynamic-dragn-drop-with-jquery-and-php/

As I understund you want to change the sort order dunamically.

thanks for the responses.

I ended up use jquery UI’s sortable interactions (after checking out dimis283’s suggestion). For that I just implemented it by extending the existing extension jui. Then just used some AJAX calls to sort all the records displayed on the screen.

Bit of a rush job unfortunately, I only did as much as I needed for my app so I could sort and save data grids. Sort of incomplete at this point as it won’t work with paginated results…

Happy to share code if anyone really wants it.

Yes, I’d definitely look into it.