Creating a jQueryUI Sortable CGridView

Comparing #2 with #3

Revision #3 was created by rAWTAZ rAWTAZ on Dec 7, 2012, 1:46:37 PM.

sort() function -> actionSort() method

Content

[...]
Here are the basic steps to achieve this:

1. Make sure your database table has a 'sortOrder' field.
2. (Optional) Add the 'sortOrder' field to your Rules() function in your model
3. Add the '
sort()' functionactionSort()' method to your controller to apply the sorting via ajax
4. Add jQuery UI to your view that has the CGridView
5. Setup the jQuery UI Code to work with the CGridView in question
6. (Optional) Apply the sorting to your model's search() function if need be

So lets get started!
[...]