How to set selected page is last page?
How to set selected page is last page?
i am using stateSave: true,
for example i have a 4 pages table.
when i remove all rows in the 4th page, it goes 1st page. But in normally it must go 3rd page.
How to fix it?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yep, because the shape of the table has changed, and page 4 is no longer viable, the table will default to showing the first page.
You could do one of two things. Either check the values in
stateLoadParams, and if the page in the saved data isn't valid, tweak it to a sensible value. Or, you could do something similar ininitComplete- callingstate.loaded()to get the loaded info, see if the page is the same, and if not, callpage()to reset the page.Colin