Some issues with State Saving / Loading
Some issues with State Saving / Loading
John Archer
Posts: 56Questions: 1Answers: 0
Hi Allan,
three things/issues/questions about this topic:
1. I think there is a typo in documentation of fnStateSaveParams: In the example it surely should be "fnStateSaveParams" and not "fnStateLoadParams".
2. When using fnStateLoadParams I want to alter some settings. E.g. I always want to start on the first page, which means I don't want use the saved pagination state. So I set
[code]oData.iStart = 0;[/code]
When I console.log oData I can see that it so correctly set to 0, but the datatable seems not to use it as it is sill on page 4, e.g.
EDIT: Sure, I could alter iStart already when I save, but it should also work while loading, shouldn't it?
3. In the documentation I see that you use oData.oFilter, but here oFilter is not defined. Instead I have to use oData.oSearch. Error in the docs or in DataTable source code? :-)
Thanks a lot in advance!
Regards
three things/issues/questions about this topic:
1. I think there is a typo in documentation of fnStateSaveParams: In the example it surely should be "fnStateSaveParams" and not "fnStateLoadParams".
2. When using fnStateLoadParams I want to alter some settings. E.g. I always want to start on the first page, which means I don't want use the saved pagination state. So I set
[code]oData.iStart = 0;[/code]
When I console.log oData I can see that it so correctly set to 0, but the datatable seems not to use it as it is sill on page 4, e.g.
EDIT: Sure, I could alter iStart already when I save, but it should also work while loading, shouldn't it?
3. In the documentation I see that you use oData.oFilter, but here oFilter is not defined. Instead I have to use oData.oSearch. Error in the docs or in DataTable source code? :-)
Thanks a lot in advance!
Regards
This discussion has been closed.
Replies
2. That should work and it appears to do so for me when I try it here: http://live.datatables.net/otecet/edit#source
3. Urgh - documentation is wrong I'm afraid. It should be oSearch not oFilter...
Allan
2. Argh, my fault, sorry ... :-(
3. :-)