Ionut Flavius Pogacian
Ionut Flavius Pogacian

Reputation: 4801

Yii Bootstrap GridView yiiPager replacement

I am trying to generate a Yii GridView using Bootstrap

On the ul element, i have the yiiPager class and i need to set it as the pagination class;

image here

code here:

<h1>Manage Request Ms</h1>
<?php
$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'request-m-grid',
    'type' => array('striped', 'bordered', 'condensed'),
    'dataProvider' => $model->search(),
    'template' => '{pager}{items}{pager}',
    'filter' => $model,
    'pager' => array(
        'header' => '',
        'hiddenPageCssClass' => 'disabled',
        'maxButtonCount' => 3,
        'cssFile' => false,
//        'class' => 'pagination',
        'prevPageLabel' => '<i class="icon-chevron-left"></i>',
        'nextPageLabel' => '<i class="icon-chevron-right"></i>',
        'firstPageLabel' => 'First',
        'lastPageLabel' => 'Last',
    ),
    'pagerCssClass' => 'pagination',
    'rowCssClass' => 'pagination',
    'columns' => array(
        'id',
        'domain_id',
        'start',
        'stop',
        'delta1',
        'delta2',
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>

Upvotes: 0

Views: 4085

Answers (1)

Telvin Nguyen
Telvin Nguyen

Reputation: 3559

$this->widget('bootstrap.widgets.TbGridView',array(
    'id' => 'request-m-grid',
....
    'pager' => array('htmlOptions'=>array('class'=>'your_css_class')), // set whatever css class you want
));

Upvotes: 1

Related Questions