Rupendra Kumar
Rupendra Kumar

Reputation: 1

Pagination dropdown not showing

I've installed Kartik Library in my Yii advanced project, and added the toolbar, but it hides the pagination. How can I make it appear?

Correct me if I am doing wrong...

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'exportTitle' => $this->title,
    'panel' => ['type' => GridView::TYPE_SECONDARY, 'heading' => $this->title],
    'export' => ['showConfirmAlert' => false,],
    'pjax' => true,
    'toolbar' => [
        '{export}',
        '{perPage}',
    ],
    'options' => [
        'class' => 'grid-primary',
    ],
    'columns' => [
        ['class' => 'yii\grid\SerialColumn'],
        .....
    ],
]); ?>

Upvotes: 0

Views: 66

Answers (1)

Ravi Thanki
Ravi Thanki

Reputation: 289

In your code columns option missing can try add like below.

'dataProvider' => $dataProvider,

'filterModel' => $searchModel,

'columns' => $gridColumns,

'responsiveWrap' => false,

Where $gridColumns is a array of columns.

$gridColumns = [

'firstname',
'lastname'

]

Ref link : https://demos.krajee.com/grid

Upvotes: 0

Related Questions