Hi,
there is a slight inconsistency with the new (and very useful! )rowHtmlOptionsExpression property of CGridView in CGridView’s renderTableRow($row):
if($this->rowHtmlOptionsExpression!==null)
{
$data=$this->dataProvider->data[$row];
$options=$this->evaluateExpression($this->rowHtmlOptionsExpression,array('row'=>$row,'data'=>$data));
if(is_array($options))
$htmlOptions = $options;
}
if($this->rowCssClassExpression!==null)
{
$data=$this->dataProvider->data[$row];
$class=$this->evaluateExpression($this->rowCssClassExpression,array('row'=>$row,'data'=>$data));
}
elseif(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0) {
$class=$this->rowCssClass[$row%$n];
}
If you look at this, you’ll see that in the case of a rowHtmlOptionsExpression being present, the default styles are still added. For my current requirements I solved it with an additional if condition:
elseif(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0 [b]&& $this->rowHtmlOptionsExpression==null[/b]) {