Author Topic: Save state using DB  (Read 2077 times)

alonewolf149

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 56
    • View Profile
Save state using DB
« on: November 14, 2019, 06:29:23 pm »
Hi,

I want to apply save state with multiple result for save table https://paramquery.com/pro/demos/grid_state

concept is user can create new tab , and each tab show same table.
and each table we can show/hide or filter result  ,etc then save.

Like this : http://prntscr.com/pwvx2u

after close or come back later, it will show same result.

so i think we need to save state usign DB

can u guide ?

thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Save state using DB
« Reply #1 on: November 14, 2019, 08:48:56 pm »
Number of grids doesn't matter ( subject to limit of browser localStorage capacity ), you can save state in either browser localStorage or DB.

In case of DB storage, you would need to send the string returned by saveState method to the server and retrieve the string from server and pass it to loadState method.

https://paramquery.com/pro/api#method-saveState

https://paramquery.com/pro/api#method-loadState