how to maintain data at client in server side paging

how to maintain data at client in server side paging

siva.kmasiva.kma Posts: 2Questions: 1Answers: 1

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

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    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

Sign In or Register to comment.