I have a status field, which should be highlighted in green or red, depending on where 0 or 1. I have the following code, but it does not work, all the cells in a single color paint. Tell me how to do such a thing?
array(
'name' => 'status',
'htmlOptions' => array('class' => $model->status == 0 ? "non_payed_status" : "payed_status"),
'filter' => false,
),
You have to override CDataColumn class, look at this, maybe will help: