I have added this 'sla_status' field in gridview and every thing is working fine only issue is I am unable to set filter values for this. 'sla_status' is not in my table.
[
'label' => Yii::t('app','Sla Status'),
'format' => 'raw',
'filterType' => GridView::FILTER_SELECT2,
'filter' => $status,
'filterWidgetOptions' => [
'options' => [
'placeholder' => Yii::t('app','All...' )
],
'pluginOptions' => [
'allowClear' => true
]
],
'headerOptions' => ['style' => 'text-align:center;color:#337ab7'],
'value' => function ($model, $key, $index, $widget)
{ }
]
and $status is $status = array('0'=>Yii::t('app', 'Inactive'),'1'=>Yii::t('app', 'Active'));