Sorry if this has been asked and answered before, but I’m guessing this is a common requirement and I have not been able to find the answer, spelled out.
The requirement is simply this:
Based on the value in a CGridView widget cell (column/row), change the background color of just that cell.
I’m guessing something like this is part of the solution:
‘htmlOptions’=>array(
'style'=>'background:#6ca5d1;color:#ffffff;
where the hex value is the color you want, but I don’t know how to add the conditional based on the cell value.
I used giix to create the view, so here is the code for one of the columns (the status of a project request). How do I alter it to add conditional background color coding? Ideally, I’d like it to be green, yellow, or red, based on its value. Thanks for any help anyone can offer!