Friday, February 21, 2014

Yii page size for cgridview pagination



   public function search()
	{
		.............

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
                        'pagination' => array(  'pageSize'=>20),
		));
	}


 Yii cgridviews shows 10 rows per page by default but can change this .

 * model have the search function for cgridview,

 * add the line 'pagination' => array(  'pageSize'=>20), below to the criteria

 * set the pageSize you would like to change.


No comments:

Post a Comment