Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82747

Limit number of page tabs with Bootstrap Pagination

$
0
0
I've been using DataTables with Editor / TableTools in a current project and it's also using BootStrap styling. One thing I noticed was that I could not control the number of page tabs being displayed when using the BootStrap style.

The only fix I found was to modify the BootStrap Pagination plugin, found here https://datatables.net/plug-ins/pagination , in the fnUpdate function I added one more 'if' before the for loop:

if (jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPage < iEnd){
   iEnd = jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPage;
}

Doing this allowed me to set the number of page tabs I wanted similar to the full text number method. This is what i use on the calling page that initializes the DataTable.

jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPage=3;

I hope this helps someone else.

Viewing all articles
Browse latest Browse all 82747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>