CGridView: $data undefined


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:




        'dataProvider' => $attendances,

        'columns' => array(





                'name' => 'status',

                'value' => Attendance::itemAlias('status', $data->status)






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


Yii 1.1.2

Correct syntax is:

'value' => 'code-for-eval'


(not a team member)

Of course, stupid mistake.

Thank you :)