Searching/paging and other operations to all work in admin grid using ajax, is built in functionality, only follow following step
In constructor of Grid.php file, add following lines
$this->setSaveParametersInSession(true);
$this->setUseAjax(true);
And in Grid.php add the function
public function getGridUrl()
{
return $this->getUrl('*/*/grid', array('_current'=>true));
}
And in your ControllerNameContrller.php add the action
public function gridAction()
{
$this->loadLayout();
$this->getResponse()->setBody(
$this->getLayout()->createBlock('modulename/adminhtml_modelname_grid')->toHtml()
);
}
In constructor of Grid.php file, add following lines
$this->setSaveParametersInSession(true);
$this->setUseAjax(true);
And in Grid.php add the function
public function getGridUrl()
{
return $this->getUrl('*/*/grid', array('_current'=>true));
}
And in your ControllerNameContrller.php add the action
public function gridAction()
{
$this->loadLayout();
$this->getResponse()->setBody(
$this->getLayout()->createBlock('modulename/adminhtml_modelname_grid')->toHtml()
);
}
The information of this post is truly nice.I believe this web log can invigorate a considerable measure of decent data known with this time.
ReplyDeleteMagento ecommerce development india
Custom magento web development