Erihon1890
Erihon1890

Reputation: 45

Datatables pagination

I have this code:

$('#ldap-users, #audit-users').dataTable({
    "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
    "bInfo": false,
    "bProcessing": true,
    "bPaginate"  : true,
    "sPaginationType": "bootstrap",
    'aaSorting': [[1, "desc" ]],
});

I got this error:

Uncaught TypeError: Cannot read property '_iDisplayStart' of null

When i click pagination button

Upvotes: 0

Views: 1984

Answers (2)

davidkonrad
davidkonrad

Reputation: 85578

This is caused by

"sPaginationType": "bootstrap",

Remove / comment that line and you are ok. Guess you need the nessecary plugin, see -> http://datatables.net/plug-ins/pagination which says :

Note that this plug-in uses the fnPagingInfo API plug-in method to obtain paging information

The sourcecode for that plugin is listed below.

Upvotes: 1

PDev
PDev

Reputation: 1562

The , after the last entry (aaSorting) is wrong. Remove it and try it again.

Upvotes: 0

Related Questions