Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82266

How to retrieve the data currently visible on the table

$
0
0
I have a table with 50 rows, and I've chosen the option "Show 10 entries", so only the first 10 records are visible. I haven't applied a filter.

How can I obtain a reference to the 10 currently-visible rows of data (and renew this reference when the user scrolls to the next/previous 10 rows)?

http://www.datatables.net/forums/discussion/10321/fngetdata-of-visible-rows-only/p1 says to use:

var data = oTable._('tr', {"filter":"applied"});

but this is still showing me all 50 rows. Do I need to use the other suggestion of traversing the nodes:

var anNodes = $("#example tbody tr");
for (var i = 0; i < anNodes.length; ++i) .....

Thanks,
Steve

Viewing all articles
Browse latest Browse all 82266

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>