Pagination 'Last' button when chunking data
Pagination 'Last' button when chunking data
Hello everyone,
I am having trouble figuring out how to make the full_numbers pagination example to display and work correctly when using the 'Last' button. I am chunking data of 100 entries, where each page shows 25 results.
I also use the information of the 'Showing 1 to 25 of 2000000' entries and I wish to make that display correctly too.
I cannot load all of the data as I go because there is way too much, so does anyone have any ideas or solutions they have found to accomplish this?
Thank you!
I am having trouble figuring out how to make the full_numbers pagination example to display and work correctly when using the 'Last' button. I am chunking data of 100 entries, where each page shows 25 results.
I also use the information of the 'Showing 1 to 25 of 2000000' entries and I wish to make that display correctly too.
I cannot load all of the data as I go because there is way too much, so does anyone have any ideas or solutions they have found to accomplish this?
Thank you!
This discussion has been closed.
Replies
Allan
I want to have it so I can still chunk, but also have the last button able to just go to the last page, and have all the page numbers and 'Showing' correct, eventhough there is a gap say of what is loaded in the table. So I would have pages 1 to 4 loaded, then I hit Last and I would then have 1 to 4 and say 30 to 34, but I dont want the pagination control displays to mess up.
Do you think this is even possible? Or should I just load the 25 for each page everytime I hit a different page?
Allan
To not have to write crazy last button logic and so forth as I was talking about. It would be easier I think to keep the Last button the way it is, and instead FILL IN the gap between the few pages of loaded data and the loaded data of the last page with empty rows.
So my question is: Is there a way to either have Datatables think it has like 400 rows then it only actually have 100 loaded for example. Or otherwise, how would I insert in empty rows and not have the table sort them which would corrupt the loaded data pages, and I will just fill in the empty rows with real data as the use pages.
Thanks allan
Yes. In the example I linked to above ten rows are shown per page, but it has actually loaded 50 records, and will load more if needed (i.e. going page the 50th record). It has loaded 50 client-side, but as you'll see there are 57 in the table.
Allan
Is that right? Not sure how the inner workings of Datatables work for that.
Allan