开发者

Magento grid disable sorting and filtering

开发者 https://www.devze.com 2023-03-31 05:29 出处:网络
How to disable sorting and filteringon a column开发者_开发知识库 in Magento gridThe easiest way is to do it in _prepareColumns() method.

How to disable sorting and filtering on a column开发者_开发知识库 in Magento grid


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
  ));


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);
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消