I have displayed the values as follows :
1 => "Active", 0 => "Inactive"
1,0 are the db values.
This is my column.
[
'label' => 'Status',
'attribute' => 'activeStatus',
'format' => 'html',
'value'=>function ($data){return $data->activeStatus ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Inactive</span>';}
],
How to enable grid filter with Active/Inactive? It can be a dropdownlist or just by typing Active/Inactive.
1 => "Active", 0 => "Inactive", it's not filtering.'filter' => ...key and make sure thatactiveStatusattribute is on therules()list in the model used for searching.