0

I am extending the \Magento\Backend\Block\Widget\Grid\Container with my block, and I want to remove the button for adding new instances of this model ("MODEL"). How can I do that?

0

Call removeButton('add') from the _construct method of your Adminhtml Block file ...

app\code\YourSpace\YourModule\Block\Adminhtml\Whatever.php

namespace YourSpace\YourModule\Block\Adminhtml;

protected function _construct()
{
    ...

    parent::_construct();

    $this->removeButton('add');
}

...
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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