Clarification of iTotalRecords and iTotalDisplayRecords
Clarification of iTotalRecords and iTotalDisplayRecords
brianbolton
Posts: 4Questions: 0Answers: 0
I'm getting some weird errors for server-side processing and I think they are related to these settings:
# iTotalRecords - Total records, after filtering (not just the records on this page, all of them)
# iTotalDisplayRecords - Total records, before filtering
I want to make sure I am interpreting them correctly.
Assuming I'm querying a view with 4780 records and DataTable is showing 10 records at a time.
With out filtering
[code]
iTotalRecords = 4780
iTotalDisplayRecords = 4780
[/code]
With filtering
[code]
iTotalRecords = some number less than 4780
iTotalDisplayRecords = 4780
[/code]
# iTotalRecords - Total records, after filtering (not just the records on this page, all of them)
# iTotalDisplayRecords - Total records, before filtering
I want to make sure I am interpreting them correctly.
Assuming I'm querying a view with 4780 records and DataTable is showing 10 records at a time.
With out filtering
[code]
iTotalRecords = 4780
iTotalDisplayRecords = 4780
[/code]
With filtering
[code]
iTotalRecords = some number less than 4780
iTotalDisplayRecords = 4780
[/code]
This discussion has been closed.
Replies
iTotalRecords = total records without any filtering/limits
iTotalDisplayRecords = filtered result count
So try just switching them on the reply from the server and it should hopefully work.
vex is quite correct in what he says. I've updated the server-side processing usage page to be a bit more clear: http://datatables.net/usage/server-side
Regards,
Allan