CgridView rowCssClass

I would appreciate any help on how to add a cssClass to a certain row using rowCssClass. I want to highlight any new (not read yet) row (as in any email service).

I do like this, but it won’t work:


<?php $this->widget('zii.widgets.grid.CGridView', array(

'id'=>'somw-grid',

'dataProvider'=>$model->search(),

'filter'=>$model,

'rowCssClass' => 'someClass',

with rowCssClass you assign a class to all rows… what you need is rowCssClassExpression - http://www.yiiframew…pression-detail

you just need a way to "know" what rows are not read yet

Btw… as this is the forum where you posted the question…. are you using Yii 1.0.x ?

I’m using the 1.1.7 version. I’ve seen that 1.1.8 is available now.

NOTE: moved topic to proper forum - General Discussion for Yii 1.1.x