Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove summary text In yii2?

Tags:

gridview

yii2

enter image description here

I want to remove the line which is show in attached screen shot from my page.How can I edit this from my yii2 project

like image 476
Priyanka Ahire Avatar asked Dec 22 '15 06:12

Priyanka Ahire


3 Answers

The best way to do this is to override the layout of the gridView widget. By default, the widget will generate a layout based on this pattern; {summary}\n{items}\n{pager}. You can control over what appears in the widget like this;

echo GridView::widget([
   'dataProvider' => $dataProvider,
   'filterModel' => $searchModel,
   'layout' => '{items}\n{pager}',
   'columns' => [
    // ...
      ],
]);
like image 145
Joe Miller Avatar answered Nov 16 '22 14:11

Joe Miller


In gridview options set summary to NULL

echo GridView::widget([
   'dataProvider' => $dataProvider,
   'filterModel' => $searchModel,
   'summary' => '',
   'columns' => [
    // ...
      ],
]);
like image 10
ck_arjun Avatar answered Nov 16 '22 14:11

ck_arjun


In your grid view , use summary as empty:

   echo GridView::widget([
   'dataProvider' => $dataProvider,
   'filterModel' => $searchModel,
   'summary' => '',

]);

For more options of grid view check this link click here...

like image 3
Amitesh Kumar Avatar answered Nov 16 '22 14:11

Amitesh Kumar