How do I get all cells from datables instance?
How do I get all cells from datables instance?
felipesmendes
Posts: 5Questions: 2Answers: 0
Hello,
I need to get all the lines and their data exactly as they appear.
I tried to catch using api.cells().render('display') but returns the data only from the first page, as I can get the data from all pages?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Drop .render() and just use https://datatables.net/reference/api/cells(). If you want the data, use https://datatables.net/reference/api/cells().data().
Actually
cells().render()
is the correct one to use if you are using a renderer and you want to get the rendered data rather than the original.It sounds to me like the issue might be that server-side processing is being used in this case (
serverSide
) since only the data shown is present on the client-side for that. I could be wrong though, a test case showing the issue would confirm this or allow the issue to be debugged if it is not that.Allan
Right, I need to use rendered data from the cell but how can I get all cells and not just the cells of the actually page?
What if you were to leave the render() blank? Do not place a string in the function as an argument?
Still bringing just the cells of that page.
We'd need a link to the page, or to a test page, showing the issue so it can be debugged. As I said above, it sounds like you are using server-side processing, and you haven't clarified if you are or not.
Allan