Answers for "yii2 editable gridview"

1

yii2 editable gridview

# https://github.com/yii2mod/yii2-editable
...
[
    'class' => EditableColumn::class,
    'attribute' => 'status',
    'url' => ['change-username'],
    'type' => 'select',
    'editableOptions' => function ($model) {
        return [
            'source' => [1 => 'Active', 2 => 'Deleted'],
            'value' => $model->status,
        ];
    },
],
...
Posted by: Guest on August-10-2021

Browse Popular Code Answers by Language