CJuiSortable with CGridView

Is this possible to do (for the purpose of re-ordering records)? Some of my site functionality requires items to be displayed in a user-specified order - I can of course create the ordering functionality on another page but it would be a lot nicer to have integrated with CGridView.

How would CGridView "know" what order you need?

Note that CJuiSortable and CGridView are two completely different modules…

I dunno man. Suppose there is a ‘sort_order’ field in the DB table - then we just display the records in CGridView ordered by sort_order.

I think that with CGridView is impossible, but is possible to do with CListView.

With a bit of effort you can use CListView for do the same job of CGridView, with the plus that you can fully operate on the html and javascript code of the entire rows.

Cheers man. I actually did create a sort order functionality in CGridView using up/down Ajax buttons - but this was very tedious. For example if you wanted to move the record at the top of the table down to the bottom it would take many mouse clicks!

I think for now I will create this functionality on a separate view.