Get filtered rows() from datatable
Get filtered rows() from datatable
![scott_o](https://secure.gravatar.com/avatar/900e7075787fb7a5853314aad4e56e1f/?default=https%3A%2F%2Fvanillicon.com%2F900e7075787fb7a5853314aad4e56e1f_200.png&rating=g&size=120)
I'm trying to get all the html rows(<tr>
elements) from the table, which I'm currently doing via $("#mytable").$("tr").each(...);
However, I'd like to only retrieve the rows that are currently "visible", or get data after my filters have been applied.
Is there an easy way to do this?
If not, where should I look in the source to make some modifications?
As a tagalong question: Is there a good way to get the current data (respecting the applied filters) for anything? Data on the table, on a row/column, anything?
Answers
Answering my own question, this is they key.
http://datatables.net/reference/type/selector-modifier
I overlooked this in the documentation.
So my query becomes
$("#mytable").#("tr", { 'search': 'applied' }).each(...);
Yup - bob on :-). Thanks for posting back with your solution!
Allan