Bhavin Solanki Bhavin Solanki - 1 year ago 67
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download