How to get the total # of records (not those being displayed)
How to get the total # of records (not those being displayed)
datatablesn00b
Posts: 7Questions: 0Answers: 0
Re,
In my test example I use fnDrawCallback to count the # of rows displayed in the table ("oTable.fnGetNodes().length") but I can't figure out how to get the total # of records that were returned by the server. Are there parameters that can be passed to fnDrawCallback?
Thanks.
In my test example I use fnDrawCallback to count the # of rows displayed in the table ("oTable.fnGetNodes().length") but I can't figure out how to get the total # of records that were returned by the server. Are there parameters that can be passed to fnDrawCallback?
Thanks.
This discussion has been closed.
Replies
[code]
"fnServerData": function ( sSource, aoData, fnCallback )
{
$.getJSON( sSource, aoData, function (json)
{
if (json['iTotalRecords'] > 0)
fnCallback(json)
});
}
[/code]