hi
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(
'dataProvider'=>$dataProvider,
'columns'=>array(
'recurrence',
array(
'type'=>'raw',
'name'=>'day',
'value'=>'$data->day',
'filter'=> ' CHtml::dropDownList(\'someName\'.$row,\'$data->day\',array(
\'Mo\'=>\'Monday\',
\'Tu\'=>\'Tuesday\',
\'We\'=>\'Wednesday\',
\'Th\'=>\'Thursday\',
\'Fr\'=>\'Friday\',
\'Sa\'=>\'Saturday\',
\'Su\'=>\'Sunday\',))',
),
'ts_id'
)
));
Thanks