I am having trouble following API documentation.
I am having trouble following API documentation.
Hi,
I am trying to find the number of rows my datatable contains.
oTable.fnSettings().fnRecordsTotal() should do it.
oTable.fnSettings().fnRecordsDisplay() will give you the number after filtering has occurred.
This is what i found in the forum discussions. But i just want to check the location where i can see all the methods/functions that i can use on datatable API.
And, i am using latest release of datatable API and i am using this to get the number of rows:
table = $("#pagination").DataTable();
var data = table.fnSettings().fnRecordsTotal();
But still no luck.
Could you please let me know, how i could get row count for datatables? And please provide me the links where i can access proper documentation for all the API methods.
Thanks!
This question has an accepted answers - jump to answer
Answers
Use
page.info()
. It is a public API (unlike the other ones you mention which are private and shouldn't be used) and has the information you request.Allan
Missed this:
Click "Reference" and then "Api" in the site navigation on the left :-).
Allan