CGridView Sort?

Can anyone point me to an example of a CGridView with sortable columns? I have set the columns sortable and the enableSorting flag to true. I think I need to specify a ‘sort’ condition in the relevant controller as well, but I can’t figure out the syntax.

Thanks in advance.

try:


$dataProvider=new CActiveDataProvider('model', array(

   'criteria'=>array(something here),

   'sort'=>array('item1','item2','item3'),//here is your deal

   'pagination'=>array(

	'pageSize'=>self::PAGE_SIZE,

   ),

)

best,

bettor