Row count of filtered rows
Row count of filtered rows
![jacomo](https://secure.gravatar.com/avatar/91ed047e736029953991dd533af5ac7b/?default=https%3A%2F%2Fvanillicon.com%2F91ed047e736029953991dd533af5ac7b_200.png&rating=g&size=120)
Hello, I need to count the rows displayed after filtering the table, I am using the page.info api but I always get the same number for displayed with the total rows.
var info = table1.page.info();
var rowstot = info.recordsTotal;
var rowsshown = info.recordsDisplay;
Is it a bug maybe? Thank you
This discussion has been closed.
Answers
Hi, I tried this code and it worked perfectly fine:
And this is my table footer:
Showing 1 to 1 of 1 entries (filtered from 2 total entries) Click row to select
Hence 1 was being alerted as rowsshown and 2 as rowstot.
Something else must be wrong with your code. You might initialize rowstot and rowsshown too early, before the filter is being applied?!
Hi @jacomo ,
Use the
recordsDisplay
as shown in this example,Cheers,
Colin