CSqlDataProvider pagination problem cgridview

Hi guys.

I´m using CSqlDataProvider to populate my cgridview. That´s my code:

$dataProvider=new CSqlDataProvider($sql,array('pagination'=>array(



That´s my grid:

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







			 	 'header'=>'Data de Registro',












And that´s my view:

<div id="grid_inconsistencia">

    	<?php $this->renderPartial('grid_inconsistencia',array('dados_grid'=>$dados_grid));?>



Note: That´s div is a jquery dialog

The pagination works but don´t show the pagination buttons and i don´t know why. Someone can help me?


Follows a screenshot to demonstrate the problem.

See the class reference here:


In short: You need to supply the “totalItemCount” property with a count of the data you’re fetching.

Thank you very much Lily, worked beautifully.