1

I use CGridView in Yii to create tables.

I would like to show my table with pagination but hide the summary text at the top, which indicates the number of page restance (Displaying 1-4 of 4 results.)

Is that possible? thank you

Sorry for my English

Kai
  • 38,985
  • 14
  • 88
  • 103
Florent
  • 761
  • 1
  • 10
  • 24

3 Answers3

8

There is a template option. By default it equals {summary}\n{items}\n{pager}

If you override it in your gridview config, you'l be able to remove summary section:

$this->widget(
                'zii.widgets.CGridView',
                array(
                    Your options here ...
                    'template' => '{items}\n{pager}',
                )
            );
4

Another option is to set the CGridView summaryText value to false

acorncom
  • 5,975
  • 1
  • 19
  • 31
1

Because YII uses CListView, it also add a certain summary class CSS in the asset folder. So to combat this, simply override the css.

Add this to your CSS.

#yw0>.summary{ 
    display:none;
}