Hi everyone,
I am having trouble getting the Gridview to work. I have setup an action column which return this button:
return '<span id="request-wrap'.$key.'">'.Html::a('<i class="gridBtn fa fa-bell"></i>', ['approval', 'id'=>$model->id], [
'id' => 'request-link'.$key,
'class' => 'requestBtn',
'title' => Yii::t('yii', 'request'),
'data-id' => $key,
'data-pjax' => '1',
]).'</span>';
the approval action is beeing run:
public function actionApproval($id){
$model = $this->findModel($id);
// action code ....
// what to return here to make my pjax widget reload the grid?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />
Yii::$app->response->format = Response::FORMAT_JSON;
return ['forceReload'=>'#crud-datatable-pjax'];
}
I just don’t know what I have to return from my controller to make the pjax widget reload. Can anyone help me with this please?
Thanks a lot.
Seb