I want to hide Yii2 GridView Action Column buttons on the base of model field status. If status is = 1 then hide view button only. How I can?
Code:
You need to change one line only.
Replace:
'template' => '{update} {delete}',
With:
'template' => function($model){ return ($model->status==1)?'{update} {delete}':'{view} {update} {delete}'; },