DataTables.php
public function init()
    {
        parent::init();
        
        //disable filter model by grid view
        $this->filterModel = null;
        
        //disable sort by grid view
        $this->dataProvider->sort = false;
        
        //disable pagination by grid view
        $this->dataProvider->pagination = false;
        
        //layout showing only items
        $this->layout = "{items}";
        
        //the table id must be set
        if (!isset($this->tableOptions['id'])) {
            $this->tableOptions['id'] = 'datatables_'.$this->getId();
        }
    }
public function init()
    {
        parent::init();
        
        //disable filter model by grid view
        $this->filterModel = null;
        
        //disable sort by grid view
        $this->dataProvider->sort = false;
        
        //disable pagination by grid view
        $this->dataProvider->pagination = false;
        
        //layout showing only items
        $this->layout = "{items}";
        
        //the table id must be set
        if (!isset($this->tableOptions['id'])) {
            $this->tableOptions['id'] = 'datatables_'.$this->getId();
        }
    }
public function init ( ) { parent :: init ( ) ; //disable filter model by grid view $ this -> filterModel = null ; //disable sort by grid view $ this -> dataProvider -> sort = false ; //disable pagination by grid view $ this -> dataProvider -> pagination = false ; //layout showing only items $ this -> layout = "{items}" ; //the table id must be set if ( ! isset ( $ this -> tableOptions [ 'id' ] ) ) { $ this -> tableOptions [ 'id' ] = 'datatables_' . $ this -> getId ( ) ; } }
Initializes the datatables widget disabling some GridView options like
search, sort and pagination and using DataTables JS functionalities
instead.
Initializes the datatables widget disabling some GridView options like search sort and pagination and using DataTables JS functionalities instead .