access recordsTotal value in server-side?
access recordsTotal value in server-side?
Awhile back I wanted to get the total count of rows for use in my script. I was told to use dt.rows().eq(0).length
, however, I just realized that this only returns the count for the page when using server-side.
For example, my paging is set at 10 per page with 13 total records and shows Showing 1 to 10 of 13 entries
. Using the above to get the count would give me 10 instead of 13.
How can I return the total count same as the value given in "info": "Showing <b>_START_</b> to <b>_END_</b> of <b>_TOTAL_</b> entries"
Answers
Found a solution...
var tableinfo = dt.page.info();
total = tableinfo.recordsTotal