(Yii)CGridView默认排序的设置

(Yii)CGridView默认排序的设置
默认生成的代码CGridView的dataProvider是$model->search(); 我们找到模型类的search方法: public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('title',$this->title,true); return new CActiveDataProvider(get_class($th...