Clarification of iTotalRecords and iTotalDisplayRecords

Clarification of iTotalRecords and iTotalDisplayRecords

brianboltonbrianbolton Posts: 4Questions: 0Answers: 0
edited August 2009 in General
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]

Replies

  • vexvex Posts: 30Questions: 0Answers: 0
    It's the other way around;

    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.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi guys,

    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
This discussion has been closed.