How to get data from specific page
How to get data from specific page
d88
Posts: 2Questions: 1Answers: 0
Hi guys,
I have a DataTable set up with a pagination and I'm trying to loop through the pages in order to fetch the data that is displayed in each page individually, but I've been unable to do so.
Any help would be appreciate it.
Regards.
This discussion has been closed.
Answers
Pagination should be handled automatically by DataTables, if you look at the most basic example.
https://datatables.net/examples/basic_init/zero_configuration.html
In that context, your question isn't very clear.
@d88 - Can you post a link to a test page showing the issue please.
Allan
Hi tangerine, let me explain a little further. I have a big DataTable with pagination in order to split the information and not overload it in one page. Now, i need to be able to export that information into pdf, excel, etc. Although, I know there is a plugin to do that kind of operation, I'm using my own couse I need to do a lot of customization and reuse it for other datatables. Now, my initial idea was to loop through the pages in the pagination in order to individually get each data shown in every page and add it to my export function. But I can't find a way to do something like, and this is not correctly written of course just to explain my point, table->getData->inPage(i).
Thanks for your response
rows().data()
will give you the data from the table. You could also usebuttons.exportData()
which is the method Buttons uses to get the export data.Allan