I am struggling with some code where I need to retrieve the total number of records. I posted about it on the datatables.net forum but unfortunately, no one was able to help me...
tableTools: {
"sSwfPath": window.STATIC_BASE + "scripts/datatable/swf/copy_csv_xls_pdf.swf",
"aButtons": [ "pdf", "csv",
"print",
{ "sExtends": "text",
"sButtonText": "TotalRecords",
"fnClick": function () {
var record_count = this.fnSettings().fnRecordsTotal();
alert(record_count);
}
}
]
}
When I try to display an alert with a simple string (e.g. "hello world"), it works fine. The issue seems to be related to retrieving the total records...
Any assistance would be greatly appreciated. Thank you.