php
you can set the EditableColumn::editableOptions['formOptions']['action'] to point to the action below
i.e. /site/editbook for the example below
use kartik\grid\EditableColumnAction;
use yii\web\Controller;
use yii\helpers\ArrayHelper;
use app\models\Book;
class SiteController extends Controller
{
public function actions()
{
return array_replace_recursive(parent::actions(), [
'editbook' => [ // identifier for your editable column action
'class' => EditableColumnAction::className(), // action class name
'modelClass' => Book::className(), // the model for the record being edited
'scenario' => Model::SCENARIO_DEFAULT, // model scenario assigned before validation & update
'outputValue' => function ($model, $attribute, $key, $index) {
return (int) $model->$attribute / 100; // return a calculated output value if desired
},
'outputMessage' => function($model, $attribute, $key, $index) {
return ''; // any custom error to return after model save
},
'showModelErrors' => true, // show model validation errors after save
'errorOptions' => ['header' => ''] // error summary HTML options
'postOnly' => true,
'ajaxOnly' => true,
'findModel' => function($id, $action) },
'checkAccess' => function($action, $model) }
]
]);
}
}