Today we are going to learn how to create dropdown in yii2 gridview. In this post, I will show you how we can add dropdown list in grid view filter and in the column value. Let's start. [php] [ 'attribute' => 'status', 'filter' => ['A'=>'Active','I'=>'Inactive','B'=>'Block'], 'filterInputOptions' => [ 'class' => 'form-control', 'prompt' => 'Select' ], 'format' => 'raw', 'value' => function ($model) { return Html::dropDownList('status', $model->status, ['A'=>'Active','I'=>'Inactive','B'=>'Block'], ['onchange' => "changeStatus($(this).val(),'$model->id')"]); }] [/php] In the above example,…
Read More