Author Topic: Restore State when using multiple grids  (Read 2234 times)

gmswsd

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 40
    • View Profile
Restore State when using multiple grids
« on: May 17, 2020, 10:12:36 am »
Hi
Save state works great when using a single grid, however when using another grid on a different tab it uses the state from the initial grid.
Is there a way to still save to the cookie but give it the name of the grid?
Also, if I have a filter from filterModel saved it saves the filter it just doesn't execute on the filter when restored.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: Restore State when using multiple grids
« Reply #1 on: May 18, 2020, 08:15:14 am »
Quote
Save state works great when using a single grid, however when using another grid on a different tab it uses the state from the initial grid.
Please assign unique id to every grid.

Quote
Also, if I have a filter from filterModel saved it saves the filter it just doesn't execute on the filter when restored.
Please share a jsfiddle.

gmswsd

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Restore State when using multiple grids
« Reply #2 on: May 18, 2020, 08:52:00 pm »
Thanks Paramvir,
How do you assign a unique id to a grid?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: Restore State when using multiple grids
« Reply #3 on: May 19, 2020, 09:00:05 am »
Code: [Select]
<div id="grid1" ></div>
<div id="grid2" ></div>
...and so on.

gmswsd

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Restore State when using multiple grids
« Reply #4 on: May 19, 2020, 09:49:20 am »
Thanks Paramvir,
That worked.