I am using Jquery Datatables to achieve search and sort functionality on HTML table <table>.
I have more then 100 rows in <table> and I used iDisplayLength=6 attribute to display on 6 records at the same time and enabled paging functionality for more records.
The problem is: I want to count that how many <tr> in <table> using jquery.
I used follwing code for that but it gives count 6 <tr> always because I used DisplayLength=6.
But I want actual count of <tr>
JavaScript
$(document).ready(function () {
$("#ContentPlaceHolder1_grdRX").dataTable({
"iDisplayLength": 6,
"bLengthChange": false,
"bFilter": true,
"bInfo": false,
"bAutoWidth": false
});
});
function getCount() {
alert($('#ContentPlaceHolder1_grdRX tr').length);
}
How can I get a count of all the rows?
iTotalDisplayRecords