开发者

Magento grid disable sorting and filtering

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜