Actually I am listing the companies in modalbox, and there is a search facility. When clicking in page number (pager) it gets redirected and whole modalbox becomes new view - what i want is if i click on page number it should list data with out redirecting. Sometime it works as intended. The code is as below, can anybody suggest me what should I do right here.
{% set pjax = pjax_begin({
'enablePushState': false,
'enableReplaceState':false,
'options': {'id': 'pjax-company-list', 'class': 'clearfix'}
}) %}
{{ use('yii/widgets/ActiveForm') }}
{% set form = active_form_begin({
'id' : 'campaign-add-company-form',
'options' : {'class' : 'campaign-add-company-form ajaxForm'},
}) %}
{{ use('yii/bootstrap/Tabs') }}
{% set columns = [
{
'class' : '\\yii\\grid\\CheckboxColumn',
},
'etternavn',
'kundenr',
'orgnr',
'web',
'gateadr',
'telefon',
{
'class' : '\\common\\grid\\EvalColumn',
'value': 'function($data){
$res = "";
if (isset($data->status)) {
$res = $data->status->statusbeskrivelse . "<br>";
}
return $res;
}',
'header': 'Status',
},
] %}
{{ use('yii/grid/GridView') }}
{{ grid_view_widget({
'id': 'campaign-add-companies',
'tableOptions': { 'class': 'table table-hover'},
'layout': "<div class=\"table-responsive\">{items}</div>{summary}<div class=\"pull-right\">{pager}</div>",
'dataProvider': dataProvider,
'columns': columns
}) }}
{{ active_form_end() }}
{% set pjax = pjax_end() %}
After two day I suspect on timeout property and track down the error occured in pjax, and track down the error with code like-
and initiate pjax with following