I Can't See The Pager In A Clistview

Hi all,

I have the next problem. I can’t see the pager using a ClistView, I can see al items but the pager is not visible.

This is my ClistView:


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







    'pager' => array(

        'header' => '',





This is the data provider:

      $dataProvider = new CSqlDataProvider($sql, array(

            'pagination' => array(

                'pageSize' => 20,



I think all is ok, but I now that I have something wrong.

Thank you very much for your help.

You have set to display 20 records per page. Do you have at least that number of records in your table / model?

Page won’t appear if you have less records than per-page-setting (that is: when it would display only: [1] page, as there are no more pages to browse).

I have discoverd my problem, you have to set $dataProvider->totalItemCount, I thought this attribute wasn’t obligatory.

Thank you!!!