2

As title says, I'd like to keep the filtering parameters for a custom grid I made in the admin.

For example, if I filter the grid, edit a row, and save, I'd like to be redirected to the grid and have the same filters applied. I've tried _redirectReferer() and poked around some admin controllers, but I didn't find anything in particular.

Any ideas?

1 Answer 1

2

Im not entirely sure, but using $this->setSaveParametersInSession(true); in

public function __construct()
    {
        parent::__construct();
        $this->setId('module_grid');
        $this->setDefaultSort('rule_id');
        $this->setDefaultDir('DESC');
        $this->setSaveParametersInSession(true);
    }

might do the trick.

2
  • I've tried that, but it doesn't seem to do anything. I tried clearing session to relogin to repeat the steps, but it's the same.
    – laketuna
    Commented Jan 26, 2015 at 17:50
  • Are you sure you set the correct ID? $this->setId('grid_id');
    – Niels
    Commented May 18, 2017 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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