Can I get array of displayed rows?
Can I get array of displayed rows?
barncattech
Posts: 25Questions: 4Answers: 0
I am using datatables 1.9 and I love it. This is probably a simple question, but I've not found this in the docs.
Is there some way that I can ask datatables what rows are currently being displayed? I want to be able to filter the table and when it is showing what I want, do something to those displayed rows in the database (i.e. set a field to true).
Thanks for any help.
LK
Is there some way that I can ask datatables what rows are currently being displayed? I want to be able to filter the table and when it is showing what I want, do something to those displayed rows in the database (i.e. set a field to true).
Thanks for any help.
LK
This discussion has been closed.
Replies
Certainly:
[code]
table.$('tr', {"page": "current"})
[/code]
will get the TR elements for the current page.
[code]
table.$('tr')
// or
table.$('tr', {"page": "all"})
[/code]
will get the TR elements for all pages.
See http://datatables.net/docs/DataTables/1.9.1/DataTable.html#$ for the full range of options with the $ API method.
Allan