How to remove summary class In yii2?

gridview yii2

7220 просмотра

3 ответа

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

Автор: priyanka ahire Источник Размещён: 13.11.2019 11:35

Ответы (3)


13 плюса

Решение

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' => [
    // ...
      ],
]);
Автор: Joe Miller Размещён: 23.12.2015 06:00

8 плюса

In gridview options set summary to NULL

echo GridView::widget([
   'dataProvider' => $dataProvider,
   'filterModel' => $searchModel,
   'summary' => '',
   'columns' => [
    // ...
      ],
]);
Автор: ck_arjun Размещён: 22.12.2015 06:32

3 плюса

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...

Автор: Amitesh Kumar Размещён: 22.12.2015 06:36
Вопросы из категории :
32x32