how to maintain data at client in server side paging
how to maintain data at client in server side paging
I am using server side paging and it works very fine but is there any way to maintain the already loaded records at client side.
Example, if we have 1000 Total records and we are showing 400 - 450 of 1000 , if user scroll up again we need to fetch data from server instead can we save already loaded 450 rows at client side ?
$("#table").DataTable({
scrollY: 280,
"processing": true,
"lengthChange": false,
"searching": false,
"serverSide": true,
dom: 'Blfrtip',
stateSave: true,
info: false,
scroller: {
loadingIndicator: true
},
"deferRender": true,
"ajax": {
"url": "xxx/yyy",
"type": "POST",
contentType: "application/json",
data: function (d) {
Answers
You could use a technique like that shown in this example. Indeed that example would apply as is, but if you wanted to cache all rows which the client-side has already seen then it would need to be modified to add that ability.
Regards,
Allan