0

I'm pretty new to Yii with Yii-bootstrap and I can't figure out why my table is still sortable.

I have an almost clean installation of Yii and I follow the instructions on the Yiibooster website for installing the booster.

To kickoff my application its nice to add some users and view the existing users. But I don't like to sortable gridview which is generated. And I can't turn it off.

What is wrong with this code?

<?php

    $gridDataProvider = new CActiveDataProvider('User',array());
    $gridColumns = array(array('name'=>'username'),array('name'=>'email'));

    $this->widget(
        'bootstrap.widgets.TbExtendedGridView',
        array(
            'fixedHeader' => true,
            'sortableRows'=>false,
            'headerOffset' => 40,
            // 40px is the height of the main navigation at bootstrap
            'type' => 'striped condensed',
            'dataProvider' => $gridDataProvider,
            'responsiveTable' => true,
            'template' => "{items}",
            'columns' => $gridColumns,
        )
    );

?>
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Thomas Croonen
  • 168
  • 1
  • 2
  • 11

1 Answers1

3

The variable is enableSorting not sortableRows.

topher
  • 14,790
  • 7
  • 54
  • 70