PJax()在yii2中不起作用

时间:2018-04-06 21:44:32

标签: yii2

我有两个模块。那个人不会使用Pjax()创建流量。这个与Grid 完全相同的代码将创建流量。有什么想法,为什么? 这两个模块的网格代码完全相同:

    <?=
    Html::endForm();
    Pjax::begin();//this is ineffective! Why !!
    ?>

    <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;'
                ],
                'pjax' => true,
                'pjaxSettings' => [
                    'neverTimeout' => 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}'
                ],
            ]);
            Pjax::end();
            ?>
        </div>
    </div>
</div>

0 个答案:

没有答案