Extracting data from visible rows w/new API

Extracting data from visible rows w/new API

ajoslin103ajoslin103 Posts: 20Questions: 4Answers: 0

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

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    Use the rows() method - specifically table.rows( { search: 'applied' } ).data().

    Generally its better to use rows().data() rather than just data() since it gives you a lot more control.

    Allan

  • ajoslin103ajoslin103 Posts: 20Questions: 4Answers: 0

    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.

This discussion has been closed.