* $rawData=Yii::app()->db->createCommand('SELECT * FROM tbl_user')->queryAll(); * // or using: $rawData=User::model()->findAll(); * $dataProvider=new CArrayDataProvider($rawData, array( * 'id'=>'user', * 'sort'=>array( * 'attributes'=>array( * 'id', 'username', 'email', * ), * ), * 'pagination'=>array( * 'pageSize'=>10, * ), * )); * // $dataProvider->getData() will return a list of arrays. *