Get count of filtered rows
Get count of filtered rows

Hi, is there any api or method to get count of filtered data ? Like we have PageInfo.pages, PageInfo.recordsTotal etc.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use
rows()
with aselector-modifier
of{search:'applied'}
in conjunction withcount()
. It would look something like thistable.rows( {search:'applied'} ).count();
.Kevin
Thank you sir.
This works for current page only, i want to get all count.
Are you using server side processing, ie,
serverSide: true
? If so then that is why as only the current page is in memory. You will want to usepage.info()
and use therecordsDisplay
property. Here is an example:http://live.datatables.net/kixixuqe/1/edit
Kevin
Yes i'm using serverSide: true