hello guys, I am using x-editable extension in my project and want to update in cgridview my record using this extension, but when I click on some editable field then a popup appears and I change the data but when click on "ok" button to update it, then it gives error that "The request is invalid".
I am sharing my cgridview and controller action code here. please if anyone knows the answer then tell me.
[PostController.php code]
public function actionUpdate()
{
$model=$this->loadModel();
if(isset($_POST['Post']))
{
$model->attributes=$_POST['Post'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('update',array(
'model'=>$model,
));
}
[and post admin cgridview code of the editable field is]
array(
'class' => 'editable.EditableColumn',
'name' => 'user_name',
'headerHtmlOptions' => array('style' => 'width: 110px'),
'editable' => array(
'url' => $this->createUrl('post/update'),
'placement' => 'right',
)
),