Hello,
I’m not sure if its a bug, so I tell you my problem:
I want to use CGridView with modified columns. I looked in the documentations and wrote this code in my view file:
$this->widget(
'zii.widgets.grid.CGridView',
array(
'dataProvider' => $attendances,
'columns' => array(
'first_name',
'last_name',
'email',
array(
'name' => 'status',
'value' => Attendance::itemAlias('status', $data->status)
),
'add_attendees'
)
)
);
Attendance::itemAlias should return me an string alias for the integer status code.
But if I run the script, I get:
Error 500
Undefined variable: data
By the way, if I comment out the array for the ‘status’ column, it works fine.
Some additional informations about my web server:
openSuse 11.1
PHP Version 5.2.13
Apache2
Yii 1.1.2