1

How can do a modal with the actionView in show in index with the gridview

Index:

<?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(); ?>

This is the controller of the view that I want to show in the modal

Controller:

<?php
public function actionView($id)
{
    return $this->renderAjax('view', [
        'model' => $this->findModel($id),
    ]);
}
?>
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
Juam
  • 11
  • 3

0 Answers0