Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - hide the buttons "Reset Filter" and "Search"

Tags:

magento

how can I hide the buttons "Reset Filter" and "Search" in a custom module grid ?

Thanks.

like image 832
Ahmed Ala Dali Avatar asked Dec 04 '22 22:12

Ahmed Ala Dali


1 Answers

Hide filter buttons only

To only hide "Reset filter" and "Search" buttons, but keep the header filter fields, you could override Mage_Adminhtml_Block_Widget_Grid::getMainButtonsHtml() with:

public function getMainButtonsHtml()
{
    return '';
}

Hide filter buttons and header filter fields

If you want to hide the whole filter stuff, "Reset filter", "Search" button and the header filter fields, you could use the setFilterVisibility() method of Mage_Adminhtml_Block_Widget_Grid:

$this->setFilterVisibility(false);
like image 113
Jürgen Thelen Avatar answered Dec 31 '22 21:12

Jürgen Thelen