Here is my code:

class Dolphin_Slideshow_Block_Adminhtml_Slideshow_Grid extends Mage_Adminhtml_Block_Widget_Grid
    public function __construct()


getGridUrl() function in grid.php:

public function getGridUrl()
    return $this->getUrl('*/*/grid', array('_current'=>true));

gridAction() function in controller:

public function gridAction()

Updates: Now, after so many try...i found if i removed foreach loop from preparecollection method then My Sorting is working....but after doing this....All store views title are not fetch into admin grid .. but there is no problem with english, french

  • check slideshow_id field is exits in model and second also check compilter is enable or not – Amit Bera May 17 '16 at 4:03
  • Also try to change ASC to asc – Amit Bera May 17 '16 at 4:05
  • yes, slideshow_id exist in model, & i also replace ASC with asc but sorting is not working...what is compliter..?? u mean to say compilation tool under system menu... – Magento 2 Learner May 17 '16 at 4:57
  • are you using multistore ? – Anil Suthar May 17 '16 at 6:57
  • yes i am using multi store – Magento 2 Learner May 17 '16 at 7:12

try this one may be it will help you for the filter and may resolve your sorting ...

protected function _filterStoreCondition($collection, $column)
    if (!$value = $column->getFilter()->getValue()) {

Hmm I think You have to use this code and default sorting will work for magento $this->setUseAjax(false);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.