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

Unable to find DataTable count when i search records

$
0
0

I have used various filters on my data table and I an easily extract the number of rows now the table has using:

var count = $('#myTable').DataTable().data().count();

or just by getting length of the final filtered list.

It does not return right result and stays with the previous result when I search using the search box. Here is my search box implementation:

$('#searchText').keyup(function(){
            table.search($(this).val()).draw();
});

When i use the data().count() after this draw() method. It sticks with previous values.

How can i get the updated table count in this after the search has been performed ?


Viewing all articles
Browse latest Browse all 82057

Trending Articles



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