class My_Module_Block_Grid_Container extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_blockGroup = 'my_module'; $this->_controller = 'my_controller'; $this->_headerText = 'My Grid'; parent::__construct(); } }
class My_Module_Block_Adminhtml_Product_Grid_Container extends Mage_Adminhtml_Block_Catalog_Product_Grid_Container { public function __construct() { $this->_headerText = 'My Product Grid'; parent::__construct(); } }In this example, we override the existing product grid container widget in the Magento Adminhtml module, set a new header text, and call the parent constructor to initialize the widget. The `Mage_Adminhtml_Block_Widget_Grid_Container` class is part of the Magento framework, specifically the `Mage_Adminhtml` module.