PJax not working!

hi guys, I have two modules. The one won’t create traffic using Pjax(). The other one with excat same code for Grid will create traffic. Any ideas, why?

Here is exactly same Gridcode for both modules:




.

.

.


        <?=

        Html::endForm();

        Pjax::begin();

        ?>


        <div class="col-md-10">

            <div class="box box-primary">

                <?=

                GridView::widget([

                    'dataProvider' => $dataProvider,

                    'filterModel' => $searchModel,

                    'filterSelector' => '.choiceRadio',

                    'id' => 'cb',

                    'columns' => $gridColumn,

                    'options' => [

                        'style' => 'overflow: auto; word-wrap: break-word;'

                    ],

                    'condensed' => true,

                    'responsiveWrap' => true,

                    'hover' => true,

                    'persistResize' => true,

                    'panel' => [

                        "heading" => "<h3 class='panel-title'><i class='glyphicon glyphicon-globe'></i> " . $this->title . "</h3>",

                        'type' => 'danger',

                        'after' => Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset Grid', ['/mail/mail-eingang/index'], ['class' => 'btn btn-warning', 'title' => 'Setzt die GridView zurück']),

                        'toggleDataOptions' => ['minCount' => 10],

                    ],

                    'toolbar' => [

                        '{export}',

                        '{toggleData}'

                    ],

                    'toggleDataOptions' => ['minCount' => 10],

                ]);

                Pjax::end();

                ?>

            </div>

        </div>

    </div>

</section>

<div class="col-md-2"></div>



Hi,

The first thing comes to my mind is that your "Pjax::begin()" and "Pjax::end()" are not placed in the same level of DOM tree. They should be the direct children of a same <div>.

And what about the difference in the controller side? The same view may not work on a different controller.

I changed calling method like this:





I changed calling pjax like this:

[code]


        <div class="col-md-10">

            <div class="box box-primary">

                <?php Pjax::begin(); ?>

                <?=

                GridView::widget([



Furthermore, noticed following:




$gridColumn = [


            [

                'attribute' => 'id',

                'contentOptions' => ['class' => 'id_breite_css'],

            ],

.

.


         [

                'class' => 'kartik\grid\BooleanColumn',

                'attribute' => 'gelesen',

                'trueLabel' => 'Ja',

                'falseLabel' => 'Nein',

                'label' => 'gelesen',

            ],



Searchnig for id: will render Pjax(), searchnig for gelesen won’t render Pjax(). I will get traffic. How can this be? Why are diffreneces searchnig for records. They all are defined in $gridColumn!