2 rowCssClassExpression

Hello everyone,

I have the database table file(…,…,…rejected, selected);

As you might guess, rejected and selected are booleen.

Now, I need to display these different type of files in the same cgridview but with different colors(with the rest of the files which are nor rejected or selected).

this work fine for one class :

 'rowCssClassExpression' => '


But how to add the second half to take care of the selected files?

Thank you

It’s not clear from your description whether both can be true at the same time, but if they can, you would use something like this:

'rowCssClassExpression' => '($data->rejected==1?"rejected-row ":"") . ($data->selected==1?"selected-row ":"")'

It did not work for me.

cheers Keith.

Thanks Keith, Its working now! Brilliant