How to get the total # of records (not those being displayed)

How to get the total # of records (not those being displayed)

datatablesn00bdatatablesn00b Posts: 7Questions: 0Answers: 0
edited May 2010 in General
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.

Replies

  • datatablesn00bdatatablesn00b Posts: 7Questions: 0Answers: 0
    OK, figured it out :)

    [code]
    "fnServerData": function ( sSource, aoData, fnCallback )
    {
    $.getJSON( sSource, aoData, function (json)
    {
    if (json['iTotalRecords'] > 0)
    fnCallback(json)
    });
    }
    [/code]
This discussion has been closed.