How To Save Dropdown Value In Cgridview To Database?

I made a dropdown in Cgridview, my problem is how can i save the value to database using a button?


Screenshot from 2014-05-15 16:04:55.png

As you can see on the photo, I made a ‘Save’ Button below. What I want is after the user choose from the dropdown (even some are NULL) and click the save button, my database should now contain the choosed value from dropdown.

Thank you for those who can help me.


It should be like this :) just for example

textfield instead of dropdown :)


echo CHtml::beginForm();

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











        'header'=>'Product Name',


        'urlExpression'=>'Yii::app()->createUrl("product/view", array("id"=>$data->id_product))',








        'value'=>'CHTML::button(\'Remove\',  array(\'submit\' => Yii::app()->createUrl("cart/remove", array("id"=>$data->id_product))))',






echo CHTML::button('Update cart',  array('submit' => Yii::app()->createUrl("cart/update")));

echo CHTML::button('Checkout',  array('submit' => Yii::app()->createUrl("order/getInfo")));

echo CHtml::endForm(); 


More links for you

Thank you :) I have to study this first :)