Pagination of ajax loaded data

Hi,

Handsontable allows to load data via ajax :
https://docs.handsontable.com/pro/1.8.2/tutorial-load-and-save.html

and Handsontable also allows to paginate data :
https://docs.handsontable.com/pro/1.8.2/demo-paginating.html

but I couldn’t find any documentation on how to paginate ajax loaded data.

Is there an easy way of doing it ?

Thanks in advance !

hy

hi @hycday

The pagination in this demo is only a script that load parts of data into a single table. It does not load all the data. The pagination effect is achieved by adding few buttons that simulates that the table is full. Under the buttons you are loading next parts of your dataset. You can use this tutorial https://docs.handsontable.com/pro/1.8.2/tutorial-load-and-save.html to load sliced json sets after a page button click.

Hi @aleksandra_budnik

I am not sure I understood what you meant :
on the pagination demo (https://docs.handsontable.com/pro/1.8.2/demo-paginating.html), all data is loaded and I can see the pages 1-2-3 etc
and on the ajax demo, I can load the data by clicking on ‘load’ indeed.

but on the pagination demo, the data is ‘hard’ coded in the source code, whereas in the ajax demo, the data come from this file : “scripts/json/load.json”

What would be the code to use to load the data from “scripts/json/load.json”, but display them in pagination ? I couldn’t make it work…

thanks in advance

hy