Hi,
I have Kartik Gridview with Dropdown but the action seems to set the Array ID rather than value.
//// action for gridview
public function actions()
{
return ArrayHelper::merge(parent::actions(), [
'editstatus' => [ // identifier for your editable action
'class' => EditableColumnAction::className(), // action class name
'modelClass' => Quote::className(), // the update model class
],
]);
}
Columns:
[
'class' => 'kartik\grid\EditableColumn',
'attribute' => 'status',
'label' => 'Status',
'vAlign' => 'middle',
'width' => '10%',
'editableOptions' => function ($model, $key, $index) {
return [
'header' => 'status',
'inputType' => 'dropDownList',
'data' => [1 =>'Pending',2 =>'Live',3 =>'Invoiced',4 =>'Part Paid',5 =>'Paid',6 =>'Rejected'],
'formOptions'=>['action' => ['/quote/editstatus']], // point to the new action
];
}
],