Extracting data from visible rows w/new API
Extracting data from visible rows w/new API
ajoslin103
Posts: 20Questions: 4Answers: 0
in DataTables
I can get the data from the whole table thusly via the new API: .DataTable.rows().data().toArray();
The only posting that I can see that shows how to get the visible rows is: .dataTable().$('tr', {"filter":"applied"})
But that gives me the <tr>'s not the extracted data
How can I get the visible subset of the table data (using the new API) as data? (not html)
thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use the
rows()
method - specificallytable.rows( { search: 'applied' } ).data()
.Generally its better to use
rows().data()
rather than justdata()
since it gives you a lot more control.Allan
Thanks Allan, using your reply I understand the rows() api description (and likely the whole api) more clearly. Thanks again for a great product, and excellent support.