Revision #175 was created by rackycz on Mar 21, 2020, 2:06:04 AM.
modal, pjax
Content
[...]
Require all granted
</Directory>
</VirtualHost>
```
You can then use http://myFictiveUrl.local in your browser
**Modal window + ajax**
---
Let's have a GridView (list of users) with edit-button which will open the edit-form in a modal window. Once user-detail is changed, ajax validation will be executed. If something is wrong, the field will be highlihted. If everything is OK and saved, modal window will be closed and the GridView will be updated.
Let's add the button to the GridView in the view **index.php** and let's wrap the GridView into the Pjax:
```php
<?php yii\widgets\Pjax::begin();?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'id' => 'user-list-GridView',
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'username',
'email:email',
['class' => 'yii\grid\ActionColumn',
'buttons' => [
'user_ajax_update_btn' => function ($url, $model, $key) {