- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2020
06:00 AM
09-26-2020
06:00 AM
Hello,
I want to hide Search button from admin grid which is created using blocks and not ui component,
How should do I that?
Thank you.
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2020
06:44 AM
09-26-2020
06:44 AM
The search button is added in a core file
at vendor/magento/module-backend/Block/Widget/Grid.php
with function
public function getSearchButtonHtml() { return $this->getChildHtml('search_button'); }
So in my module's grid file I have added same function as follows to remove Search button
public function getSearchButtonHtml()
{
return '';
}
Thanks
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2020
06:44 AM
09-26-2020
06:44 AM
The search button is added in a core file
at vendor/magento/module-backend/Block/Widget/Grid.php
with function
public function getSearchButtonHtml() { return $this->getChildHtml('search_button'); }
So in my module's grid file I have added same function as follows to remove Search button
public function getSearchButtonHtml()
{
return '';
}
Thanks