This tutorial will helpful to understand about pagesize in cgridview or listview. Here i added the source code to show number of records per page. $criteria=new CDbCriteria; if($isdesired!=”){ $criteria->addCondition(“status=1”); $pagination=array(‘pageSize’=>8); $dataProvider=new CActiveDataProvider(‘Document’, array(‘criteria’=>$criteria,’pagination’=>$pagination )); $this->render(‘documentviewindex’, array(‘dataProvider’=>$dataProvider, )); }
Tag Archives: Yii Pagination
Create New Look For Pager Of Great Yii. Yii pagination widget is the one of the feature in yii framework. Listview and gridview have the pagination and it have the some basic properties, design and values for that properties. We can change the pager propertices and make new look for pagination. I added the sourcecode […]
When we are having more data and have to split it as many pages using pagination. By default, Yii2.0 is having that option for pagination. For the pagination, we have to send some information to page they are total item count, page size(number of records per page), current page etc. Simple Pagination CustomPagination Class Custom […]