I really had a hard time figuring it out so I am kindly asking you to help me with this.
I am trying to save multiple column values in CGridView using a button. So I have something like this:
5579
I followed this tutorial Click but I did not understand it well so I just copied what he said in the Model:
public function getDecidedMode(){
$modes = array(
1 => 'Value1',
2 => 'Value2',
3 => 'Value3',
4 => 'Value4',
5 => 'Value5',
);
return CHtml::dropDownlist('decided_mode',$this->decided_mode,$modes, array(
'class' => 'decided_mode',
'data-id' => $this->id,
));
}
In my view:
...
array(
'name' => 'decided_mode',
'type' => 'raw',
'value' => '$data->DecidedMode',
),
...
Now, I want to create a button at the bottom that will handle ActionSave in order to save all values in each column selected. I need some code to try for it to finally finally work.
Thank you guys.Hope you can give me some code here.