How to reset the magento admin grid – page count in magento

How to reset the magento admin grid – page count in magento:

1. When we create a custom grid in magento admin we may face some issue on page count. Some time’s our result object (from grid)
will display properly. But Top count might be wrong.

2. In this scenario we have to reset the count from collection as like below

class Jute_Sales_Model_Resource_Order_Collection extends Mage_Sales_Model_Resource_Order_Collection
{
public function getSelectCountSql()
{
$countSelect = parent::getSelectCountSql();
$countSelect->reset(Zend_Db_Select::GROUP);
return $countSelect;
}
}

3. Clear cache and check.

Thanks to Vineela

————————————————————————————————————————————————————————————-

Corner of Blog:

” Save Agriculture !!! “

———————————————————————————————————————————————————————————————-