Home >Backend Development >PHP Tutorial >When Grid exports page data, clicking the export icon does not display the option list.
I started exploring the use of grid extension to display tables this afternoon. Now I can display the data, but clicking the export icon does not display the option list.
Now the page effect is as follows:
The code for the view part is as follows:
<code>'pjax' => true,//加载loading动画 'bordered' => true, 'striped' => false, 'condensed' => false, 'responsive' => true, 'hover' => true, 'floatHeader' => true, 'floatHeaderOptions' => ['scrollingTop' => 50], // 'showPageSummary' => true, 'panel' => [ 'heading'=>'<h3 class="panel-title"><i class="glyphicon glyphicon-globe"></i> Countries</h3>', 'type'=>'success', 'before'=>Html::a('<i class="glyphicon glyphicon-plus"></i> Create Country', ['create'], ['class' => 'btn btn-success']), 'after'=>Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset Grid', ['get-school-in-province'], ['class' => 'btn btn-info']), 'footer'=>false, 'export'=>true, 'toolbar'=>true, ], 'exportConfig' => [ GridView::PDF => [ 'label' => '导出CSV', 'iconOptions' => ['class' => 'text-primary'], 'showHeader' => true, 'showPageSummary' => true, 'showFooter' => true, 'showCaption' => true, 'filename' => '用户表'.date("Y-m-d"), 'alertMsg' => '确定要导出CSV格式文件?', 'options' => [ 'title'=>'', ], 'mime' => 'application/pdf', 'config' => [ 'colDelimiter' => ",", 'rowDelimiter' => "\r\n", ], ], // GridView::HTML => [], // GridView::PDF => [],</code>
]
The error is reported as follows:
Why doesn’t it happen when I click the export drop-down box in the upper right corner?
Please answer your questions! ! !
I started exploring the use of grid extension to display tables this afternoon. Now I can display the data, but clicking the export icon does not display the option list.
Now the page effect is as follows:
The code for the view part is as follows:
<code>'pjax' => true,//加载loading动画 'bordered' => true, 'striped' => false, 'condensed' => false, 'responsive' => true, 'hover' => true, 'floatHeader' => true, 'floatHeaderOptions' => ['scrollingTop' => 50], // 'showPageSummary' => true, 'panel' => [ 'heading'=>'<h3 class="panel-title"><i class="glyphicon glyphicon-globe"></i> Countries</h3>', 'type'=>'success', 'before'=>Html::a('<i class="glyphicon glyphicon-plus"></i> Create Country', ['create'], ['class' => 'btn btn-success']), 'after'=>Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset Grid', ['get-school-in-province'], ['class' => 'btn btn-info']), 'footer'=>false, 'export'=>true, 'toolbar'=>true, ], 'exportConfig' => [ GridView::PDF => [ 'label' => '导出CSV', 'iconOptions' => ['class' => 'text-primary'], 'showHeader' => true, 'showPageSummary' => true, 'showFooter' => true, 'showCaption' => true, 'filename' => '用户表'.date("Y-m-d"), 'alertMsg' => '确定要导出CSV格式文件?', 'options' => [ 'title'=>'', ], 'mime' => 'application/pdf', 'config' => [ 'colDelimiter' => ",", 'rowDelimiter' => "\r\n", ], ], // GridView::HTML => [], // GridView::PDF => [],</code>
]
The error is reported as follows:
Why doesn’t it happen when I click the export drop-down box in the upper right corner?
Please answer your questions! ! !
Does anyone know about this? Please give me some advice