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?

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.

| improve this answer | |
  • 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. – musicliftsme Jan 26 '15 at 17:50
  • Are you sure you set the correct ID? $this->setId('grid_id'); – Niels May 18 '17 at 14:40

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.