sushantsahay
sushantsahay

Reputation: 361

Magento grid disable sorting and filtering

How to disable sorting and filtering on a column in Magento grid

Upvotes: 16

Views: 16272

Answers (2)

Kinjalkumar Prajapati
Kinjalkumar Prajapati

Reputation: 181

For Disable filter for all columns in custom grid, you can use the following methods.

Set the following methods $this->setFilterVisibility(false); in your custom Grid.php(Block) file .

 public function __construct() {
        parent::__construct();            
        $this->setFilterVisibility(false);
    }

Upvotes: 7

Alexei Yerofeyev
Alexei Yerofeyev

Reputation: 2103

The easiest way is to do it in _prepareColumns() method.

  $this->addColumn('item', array(
      'header'    => Mage::helper('module')->__('Object'),
      'index'     => 'item',
      'filter'    => false,
      'sortable'  => false
  ));

Upvotes: 39

Related Questions