rjmcb rjmcb - 1 month ago 10
jQuery Question

Change values of select box of "show 10 entries" of jquery datatable

By default, jquery datatable shows 10 by default and has

options : 10,25,50,100

How can I change these options?

Answer

Don't forget to change the iDisplayLength as well:

$(document).ready(function() {
    $('#tbl_id').dataTable({
        "aLengthMenu": [[25, 50, 75, -1], [25, 50, 75, "All"]],
        "iDisplayLength": 25
    });
} );