Magento 1.9 – Remove Save and Reset Button from Edit Form

adminformmagento-1.9

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()
{
    parent::__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() {
            editForm.submit($('edit_form').action+'back/edit/');
        }
    ";
    */
}   

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.

Best Answer

Add this in the method you mentioned

$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');