I use standard GridView::widget . Tell me how in ActionColumn to display by condition in one line only view ( {view} ), and in another view and delete ( {view} {delete} ).

Here is almost my case, only in this example the set of control buttons in the entire table changes, and I need to line by line.

  • @ user3127286 Thanks a lot. - Desh

1 answer 1

With version 2.0.7, the visibleButtons parameter is available in ActionColumn

 [ 'class' => ActionColumn::className(), 'visibleButtons' => [ 'update' => function ($model, $key, $index) { return $model->status === 'editable'; } ] ] 

Here more