Create magento admin controller

<?php class Display_Customgrid_Adminhtml_CustomgridController extends Mage_Adminhtml_Controller_Action { public function indexAction() { $this->loadLayout(); $this->_initAction(); $this->_addContent($this->getLayout()->createBlock(‘display_customgrid/adminhtml_customgrid’)); $this->renderLayout(); } public function gridAction() { $this->loadLayout(); $this->getResponse()->setBody( $this->getLayout()->createBlock(‘display_customgrid/adminhtml_customgrid’)->toHtml() ); } }

<?php
class Display_Customgrid_Adminhtml_CustomgridController extends Mage_Adminhtml_Controller_Action {

    public function indexAction() {
        $this->loadLayout();
        $this->_initAction();
        $this->_addContent($this->getLayout()->createBlock('display_customgrid/adminhtml_customgrid'));
        $this->renderLayout();
    }

    public function gridAction()
    {
        $this->loadLayout();
        $this->getResponse()->setBody(
            $this->getLayout()->createBlock('display_customgrid/adminhtml_customgrid')->toHtml()
        );
    }
}

Share this Tutorial