Paging navigation buttons disabled when server-side processing, and jquery UI are used

Paging navigation buttons disabled when server-side processing, and jquery UI are used

marcinsmarcins Posts: 2Questions: 0Answers: 0
edited November 2012 in Bug reports
version: 1.9.4
line: 11713
function: [code] "fnUpdate": function ( oSettings, fnCallbackDraw ) [/code]
line contents: [code] var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength); [/code]

The number of pages is counted using fnRecordsDisplay(), which returns display records count instead of all records count. This can be fixed by replacing this call with fnRecordsTotal():
[code] var iPages = Math.ceil((oSettings.fnRecordsTotal()) / oSettings._iDisplayLength); [/code]

This wrong function call leads to the paging navigation buttons being disabled, as dataTables thinks total record count is equal to display record count.

Replies

  • marcinsmarcins Posts: 2Questions: 0Answers: 0
    After some time I see this is not a bug. I have misused the iTotalRecords and iTotalDisplayRecords parameters, which made me think that dataTables picks the wrong values..
This discussion has been closed.