Hi guys,
i want to format a value in the grid according to another row value, like:
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'events-grid',
'dataProvider' => $dataProvider,
'columns' => array(
array(
'name' => 'event',
'value' => '$data->text;',
//if $data->isread format string e.g. bold (line 23)
'htmlOptions' => ($data->isread) ? array('style'=>'font-weight:bold') : array(),
'header' => 'Event',
),
),
));
This approach does not work, but i get the error:
Notice: Undefined variable: data in D:\dev\ciprojects\oya_yii\protected\views\events\index.php on line 23
Is there any possible way in a gridView to format the data based on the content?
TIA
Marco