Got a strange thing here, when I use CGridView to show results from two joined table, say student table and registration table. when I access the fields from registration table.
That is right, it is HAS_MANY. The thing is if I use $data->registrations[0][‘course_id’], when I sort the grid, if will generate error complain about undefined index 0.