I want to change the CGridView text field to dropdown menu and change the numbers to categories name.
$model = new Products('search');
$model->unsetAttributes();
if(isset($_GET['Products'])){
$model->attributes=$_GET['Products'];
}
And in the view.
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$model->search(),
'columns'=>array( 'code',
'category_id',
'quantity',
),
'filter'=>$model,
));
?>