jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPages
jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPages
ilatine
Posts: 20Questions: 2Answers: 0
The below worked in version 1.9 but doesn't anymore when I upgraded the dataTable to v1.10.6
jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPages = 3;
Here's a snippet of the code (datatable options):
var myDataTable = $(tableID).dataTable({
"sScrollY": "auto",
"bDestroy": true,
"bPaginate": true,
"bProcessing": true,
"aaData": tCells,
"aoColumns": tHeader,
"sPaginationType": "full_numbers",
"iDisplayLength": (defaultDrillDownLength || 10),
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"sDom": 'RC<"topPagination"ilp>frt<"bottomPagination"p>',
"aaSorting": (sortCols ? sortCols : [[0,'asc']]),
"oLanguage": {
"sInfoFiltered": "",
"sLengthMenu": "Show _MENU_ entries Data as of: " + dataAsOf
},
//turning bSortClasses off should be a performance boost for large datasets. disable the addition of the classes 'sorting_1', 'sorting_2' and 'sorting_3' to the columns which are currently being sorted on
"bSortClasses": false,
"responsive": false
});
jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPages = 3;
Any ideas please?
This discussion has been closed.
Replies
It is called
$.fn.dataTable.ext.pager.numbers_length
in 1.10. It is still a hidden "feature" and isn't really fully supported - although it should work!Allan
I get the following error when I do the below:
$.fn.dataTable.ext.ext.pager.numbers_length=3;
Error: SCRIPT5007: Unable to get property 'pager' of undefined or null reference
Am I missing something?
Doh sorry - I had one too many
ext.
's in the line... Edited now. Example: http://live.datatables.net/senigeye/1/editIt doesn't currently work with values less than 5 unfortunately due to the new ellipsis display.
Allan
Thanks a bunch. That worked!