I have a pretty standard GridView on an index page for a table. One of the attributes I want to display is "Active", a boolean value describing whether or not the given record is "active". Here is the snippet:
[
'class' => 'yii\grid\DataColumn',
'attribute' => 'Active',
'value' => function($data){return $data->Active ? 'Active' : 'Inactive';} //Done so this displays text rather than 1 or 0
],
The standard filter mechanism is a text input, however I would like it to be a checkbox for this given column. I’ve tried to research on how to change the filtering mechanism, however I’ve not come up with anything useful. Is there a document I’m missing on this subject?
Thanks.