Getting back all (even filtered ones)
Getting back all (even filtered ones)
vismark
Posts: 79Questions: 5Answers: 0
Hi, I need to fetch back all <tr>, even those hidden by filter or pagination.
I tried rows().every() and rows().data(), but I'm obtaining only an object with the cell content from the visible rows ONLY.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
By default
rows()
method selects rows from all pages with no filtering applied. See this example for demonstration.Can you please demonstrate the issue with an example or URL to your project?
See more articles about jQuery DataTables on gyrocode.com.
Thanks gyrocode, rows() returns an array with the cell contents. I need to fetch back all <tr> in html format. I was not clear enough in the first post, sorry.
rows().nodes()
will do what you are looking for.Note that if you are Ajax loading the data and have
deferRender
enabled, then only the rows that have been drawn thus far will be given (that's kind of the point of `-init deferRender ).Also, if you are using server-side processing, then you would only get the rows that are currently visible. Again, that's kind of the point of server-side processing.
Allan
Thanks a lot allan, this is what i was looking for!