How to use custom value in cgridview?
'value'=>'$data->example',
//the value if 0 write no, else yes
How to use custom value in cgridview?
'value'=>'$data->example',
//the value if 0 write no, else yes
You should define the attributes in your AR class:
class Post extends CActiveRecord
{
public $custom_var;
...
}
or
'value'=>'($data->example)?"yes":"no"',
Thank you, it’s perfect!