Get filtered rows() from datatable
Get filtered rows() from datatable
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