How
How
YoanAsh
Posts: 2Questions: 1Answers: 0
Hi,
How to count the number of rows with a specific value in a column of a filtered array.
var table = $('#table').DataTable( {
"drawCallback": function ( ) {
var api = this.api();
var count = api.rows({filter :'applied'})
.column( 7 )
.data()
.filter( function (value, index) {
return value=="myValue" ? true : false;
}).length;
}
}
This returns me the number of value of all the table, without the search filters.
Thanks for your help
This discussion has been closed.
Answers
Hi find the solution :
api.column(7, {search: 'applied'}).data()