Comparing
#3 with
#5
Title
pPjax gGridvView delete button issu: refresh page after delete
Content
[...]
How to refresh current page with pjax after deleting the record? It seems there is no very simple solution.
1. Controller file
```
public function actionDelete($id)
{[...]
return $this->redirect(['index']);
}
```
```
2. index.php
(view file)
```
<?php
$this->registerJs("
$(document).on('ready pjax:success', function() {[...]
});
");
?>
<?php Pjax::begin(['id' => 'my_pjax']); ?>
<div class="shop-index">
<?= GridView::widget([[...]
]); ?>
</div>
<?php Pjax::end(); ?>
```