Keep the Entry Number upon refreshing the webpage
Keep the Entry Number upon refreshing the webpage
I am not very familiar with Datatables and I was wondering if it is possible to remember/keep the 'Show X entries' amount upon refreshing your webpage. Can that be done through the Jquery of DataTables.net or Will I have to obtain the information somewhere else?
``` $(document).ready(function () {
$('#Container').DataTable({
"scrollX": true,
"iDisplayLength": 10,
"aLengthMenu": [[10, 15, 20, 25, 50, -1], [10, 15, 20, 25, 50, "All"]],```
I could possibly put the aLenghtMenu in a Variable and that you can use that in a cookie to remember the amount if the user refreshes the webpage.
Thank you in advance.
This question has an accepted answers - jump to answer
Answers
Have you looked at the
stateSave
option?Kevin
Thanks a lot for the reply,
stateSave
is exactly what I have been looking for!