2

How can i remove add new button from my custom module? I follow below link but the button did not remove -> http://blog.chapagain.com.np/magento-how-to-remove-or-rename-add-new-button-from-admin-grid/

1
  • From which grid? the page you linked is for magento1 code.
    – LucScu
    Jan 27, 2021 at 11:05

1 Answer 1

3
protected function _construct()
{
    $this->_addButtonLabel = __('Custom Name'); // to change the add new button value 
    parent::_construct();
    $this->buttonList->remove('add'); //to remove add button
    $this->buttonList->remove('save'); //to remove save button
    $this->buttonList->remove('reset'); //to remove reset button
    $this->buttonList->remove('delete'); // to remove delete button
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.