Total records shown after an AJAX call

Total records shown after an AJAX call

chinapotchinapot Posts: 7Questions: 3Answers: 0

Hi,

Is there a way to get the recordsTotal / recordsDisplay from a custom attribute in a JSON object obtained via an AJAX call?

I'm using DataTables 1.10.2 and the way the _fnAjaxUpdateDraw method is getting those values is pretty much fixed:

var recordsTotal = compat( 'iTotalRecords', 'recordsTotal' );

If I have to retrieve the values from some different attribute in a complex JSON objecto, do I have to do it manually in the DrawCallback ? If so, what's the proper way to update the paging values (without another server call) ?

Or is there a 'cleaner' way, via configuration or some datatable api call?

Thank you

This discussion has been closed.