title: Hide Yii2 GridView Action buttons
body: <p>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?</p>
  
  <p>Code:</p>
  
  <pre><code>     [  
          'class' =&gt; 'yii\grid\ActionColumn',
          'contentOptions' =&gt; ['style' =&gt; 'width:260px;'],
          'header'=&gt;'Actions',
          'template' =&gt; '{view} {delete}',
          'buttons' =&gt; [
  
              //view button
              'view' =&gt; function ($url, $model) {
                  return Html::a('&lt;span class="fa fa-search"&gt;&lt;/span&gt;View', $url, [
                              'title' =&gt; Yii::t('app', 'View'),
                              'class'=&gt;'btn btn-primary btn-xs',                                  
                  ]);
              },
          ],
  
          'urlCreator' =&gt; function ($action, $model, $key, $index) {
              if ($action === 'view') {
                  $url ='/jobs/view?id='.$model-&gt;jobid;
                  return $url;
          }
  
         ],
  </code></pre>