Cgridview Dropdownlist


I have a view which uses the cgridview,

In this grid I want to display the day of the week, and subsequently allow the user to modify it as well. Hence I am using the dropdownlist. The actual data is stored as two letter prefix in the database, so I need to map the value from db to the actual day.

My code for the grid is mentioned below, pls see if I am missing something here:

$this->widget('zii.widgets.grid.CGridView', array(








				'filter'=> ' CHtml::dropDownList(\'someName\'.$row,\'$data->day\',array(













Hi, the filter is an array.

Here an example of CgridView declaration in my project:




            'filter' => array('lié à un groupe' => 'lié à un groupe', 'non lié à un groupe' => 'non lié à un groupe', CHtml::listData(Groups::model()->findAll(array('condition'=>'group_id > 0 and semester_id =' .Yii::app()->user->getState('defaultSemester'))), 'group_id', 'group_name')),

Hope it will help.


if u are fetch the data form table




			'filter'=>GxHtml::listDataEx(LiquorCategory::model()->findAllAttributes(null, true)),