I am trying to create an Ajax GridView using Pjax. Everything works fine, except that the view, update, and delete buttons are not AJAX. Code:
<?php yii\widgets\Pjax::begin(['id' => 'demo']); ?> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'id', 'name', ['class' => 'yii\grid\ActionColumn'], ], ]); ?> <?php yii\widgets\Pjax::end(); ?>
The problem is that links for deleting, viewing, and updating have the data-pjax = 0 attribute, which disables AJAX functionality. I canโt find out how to set it also data-pjax = 1.
source share