State Saving
State Saving
Is there a way to save the state of the datatable across similar pages or a parent page?
For example, my app has a competitor page with a datatable. Each competitor has different data in the table, but the same table structure. State saving works for individual urls (such as /competitor/1234) but if I go to a different competitor such as /competitor/12345 the table is the default.
I am looking to save column order and hidden columns etc. by user logged in.
This question has an accepted answers - jump to answer
Answers
Yes. There was a discussion about this exactly topic not long ago and I provided an example of how it could be done, but I can't find it now!
Because you simply would use
stateSaveCallback
andstateLoadCallback
to store the information. If you look at the default methods you will be able to see that it uses thelocation.pathname
parameter to add path information. You would just providing callbacks that don't use that information.Regards,
Allan
Perfect! This worked for me:
Nice one - thanks for sharing your solution with us!
Allan