In custom module I have one grid. in that grid i don't want to edit data from admin panel. I want to just view of that data so i want to remove save button and reset button.

In Edit.php

public function __construct()
    $this->_objectId = "example_id";
    $this->_blockGroup = "example";
    $this->_controller = "adminhtml_example";
    // $this->_updateButton("save", "label", Mage::helper("example")->__("Save Tutor"));
    $this->_updateButton("delete", "label", Mage::helper("example")->__("Delete Tutor"));

    $this->_addButton("saveandcontinue", array(
        "label"     => Mage::helper("example")->__("Save And Continue Edit"),
        "onclick"   => "saveAndContinueEdit()",
        "class"     => "save",
    ), -100);

    $this->_formScripts[] = "
        function saveAndContinueEdit() {

I m comment code of save button and saveAndContinueEdit button but save button is display.

I know another way to admin can't save data using disable set as true in all addfield but i want to remove add button and reset button if possible and i want to remove this button using custom module.

3 Answers 3


Add this in the method you mentioned


Note that Magento does not want you to override the __construct method. You should override the _construct method instead. One problem is that you cannot remove buttons in the _construct method. But you can simply override the _prepareLayout method for that purpose:

protected function _prepareLayout()

    return parent::_prepareLayout();
  • 1
    That's true, but there are a lot of core classes that override the __construct method.
    – Marius
    Commented May 22, 2015 at 8:35
  • 1
    @Marius Core classes are often not good as a reference for good code style I think :D
    – Simon
    Commented May 22, 2015 at 9:38

To remove buttons on MAGENTO 2 admin form:


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.