If you want to set a default sort order for a CGridView, often used in admin views you can do so in the controller as part of the search() function:
$dataProvider = new CActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
'sort' => array('defaultOrder' => 'name')
));
[carousel keywords=”yii” tag=”fetchit-21″]