Hi there, I am working on CgridView in which i want to render student results. Now i have an attribute named status so i write like this in column
array( 'Header'=>'Result', 'name'=>'status' ) )
This works great but I need to check whether this student is pass or Fail so depending upon the result the color of the cell would be changed. Now i tried to use property
of CDataColumn but when i wrote it in if statement it gave error.
when i tried to change htmlOptions depending upon result like this
It always return false.
Official document says about this property that
description=a PHP expression that will be evaluated for every data cell using evaluateExpression and whose result will be rendered as the content of the data cell.
Now my question is that how to set htmlOptions depending upon status?