how to remeber selected Length of a table ?
how to remeber selected Length of a table ?
I am new to this plugin and using datatable with following filtering option..
"sLengthMenu": 'show _MENU_entires',
I have requirement to remember the selected filtered option till the page is closed or navigated.
The problem right now is, if I choose 50, traverse the 24 records, click on 24th and I go to the different page say page A. When I close page A, I see the previous page filter is reset to 10 records and I can only see 10 records.
Expected behavior is, when I close page A I should still see the filter to 50 and the records on page accordingly.
Can it be achieved?
Answers
Use State Saving which will save the length of the table if you leave the page and return it'll remain at the length selected.
http://www.datatables.net/examples/basic_init/state_save.html