如何使用gridview
在index中显示带有actionView的模态索引:
<?php Pjax::begin(); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'pjax'=>true,
'columns' => [
['class' => 'kartik\grid\SerialColumn'],
'id',
'fecha',
'motivo',
'horarioinicio',
'horariotermino',
[
'class' => 'kartik\grid\ActionColumn',
'viewOptions'=>[
'label' => '<i class="glyphicon glyphicon-ok"></i>',
],
],
],
]); ?>
<?php Pjax::end(); ?>
这是我想在模态
中显示的视图的控制器控制器:
<?php
public function actionView($id)
{
return $this->renderAjax('view', [
'model' => $this->findModel($id),
]);
}
?>