Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Syntax Error In Expression Of Rowcssclassexpression

$
0
0
Hello,
In following code i am trying set an expression for rowCssClassExpression:
	$this->widget('zii.widgets.grid.CGridView',array(
    	'dataProvider'=>$model->search(),
    	'filter'=>$model,
    	'rowCssClassExpression'=>' if($data->type == 1) return "deleted-row" ',
    	. . . 
    	. . . 
    	. . . 


but get error:
Parse error: syntax error, unexpected T_IF in C:\Apache2\htdocs\yii\framework\base\CComponent.php(607) : eval()'d code on line [i]1[/i]

What's the correct syntax for rowCssClassExpression?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>