Bhavin Solanki Bhavin Solanki - 3 months ago 6x
PHP Question

Display summary of cgrid view at bottom of grid

I use CGridView in Yii to create tables. I would like to show my table with pagination, but display summary text (i.e.

Displaying 1-4 of 4 results.
) at the bottom of grid. Is it possible in Yii?


You need to add this property to your array options widget:


This is how it should look like:

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

Yii docs - CBaseListView