How to remove summary text In yii2?
10,112
Solution 1
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' => [
// ...
],
]);
Solution 2
In gridview
options set summary
to NULL
echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'summary' => '',
'columns' => [
// ...
],
]);
Solution 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...
Author by
Priyanka Ahire
I am Priyanka Ahire. I have 5 years of experience as Developer. Currently Working on angular 2, 4, 6, 8, JavaScript, Ionic, NodeJs, CSS, SASS, Jquery, HTML
Updated on June 14, 2022