Clistview With Pagination

I don’t get along with pagination for one of my CListView. In my controller I fetch records to a CActivedataProvider by using a criteria and I pass that data provider to my CListView. I can see that database fetch is working fine since I can see all records in my CListView if I don’t apply pagination.

The problem begins when pagination is turned on. I would like to see all records on a separate page with a pagination at the bottom.

What I’m doing wrong?

Thanks in advance,

Here is what I have in my controller:






			$egyedi_osszetevo_idk = Lista::getEgyediOsszetevoIdk($model->datum_tol, $model->datum_ig);


			$criteria = new CDbCriteria();

			$criteria->addInCondition("id", $egyedi_osszetevo_idk);

			$count = EtelOsszetevo::model()->count($criteria);


			$pages=new CPagination($count);




			$dataProviderEgyediOsszetevok = new CActiveDataProvider('EtelOsszetevo', array(








Here is my CListView in my view file:

$this->widget('zii.widgets.CListView', array(




maybe let the dataprovider setup the pagination?

$dataProviderEgyediOsszetevok = new CActiveDataProvider('EtelOsszetevo', array(


    'pagination' => array(

        'pageSize' => 1,




It should be like this

return new CActiveDataProvider($this, array(






				'defaultOrder'=>'pgm_credit DESC',



so my advice delete those lines :)

Still doesn’t work. When I click on next page button it loads my main menu into the view.

I’m not really getting this. So, you say that I need to use return instead of render? I have to pass another model to my view as well that’s why I use render.