How can I get the "fnRecordsTotal" if I use an AjaxSource ?

How can I get the "fnRecordsTotal" if I use an AjaxSource ?

rcmeng93rcmeng93 Posts: 1Questions: 1Answers: 0
      var lastRow;
      var table = $('#example1').DataTable({

          "sAjaxSource" : 'assets/ajax/page_main_online.txt'
      });

      var oSettings = table.fnSettings();
      lastRow = oSettings.fnRecordsTotal() ;

      alert(lastRow);

When I use an AjaxSource ,the result of lastRow is 0, so how can I get the value of "fnRecordsTotal" ?

Thanks.

This discussion has been closed.