Quantcast
Channel: Krajee Yii2 Extensions – Krajee Web Tips
Viewing all articles
Browse latest Browse all 129

editable column

$
0
0

hello guys;
I am following doingITeasy video tutorial for yii2-editable case.
but the following errors are happening.
any help is appreciated!!!

internal error
view image

“Internal Server Error”

my code is here
index.php
[   'class'=>'kartik\grid\EditableColumn',
                'header'=>'Functional',
                'attribute'=>'functional',
                'value'=>'functional',
               
    ],

actionindex
     $searchModel = new IreturnSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        if(Yii::$app->request->post('hasEditable'))
        {
            $ireturnId = Yii::$app->request->post('editableKey');
            $ireturn = Ireturn::findOne($ireturnId);
            $out = \yii\helpers\Json::encode(['output'=>'','message'=>'']);
            $post = [];
            $posted = current($_POST['Ireturns']);
            $post['Ireturns']= $posted;
            if($ireturn->load($post))
            {
                $ireturn->save();
                $output ='my values';
                $out = \yii\helpers\Json::encode(['output'=>$output,'message'=>'']);
            }
            return;
        }
        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);

The post editable column appeared first on Krajee Web Tips.


Viewing all articles
Browse latest Browse all 129

Trending Articles