$dataProvider=new CActiveDataProvider('News'); $sort=new CSort('Cases'); $sort->defaultOrder='id DESC'; $dataProvider->setSort($sort);