How to show all rows by default in JQuery DataTable How to show all rows by default in JQuery DataTable jquery jquery

How to show all rows by default in JQuery DataTable


Use:

$('#example').dataTable({    aLengthMenu: [        [25, 50, 100, 200, -1],        [25, 50, 100, 200, "All"]    ],    iDisplayLength: -1});

Or if using 1.10+

$('#example').dataTable({    paging: false});


The option you should use is iDisplayLength:

$('#adminProducts').dataTable({  'iDisplayLength': 100});


$('#table').DataTable({   "lengthMenu": [ [5, 10, 25, 50, -1], [5, 10, 25, 50, "All"] ]});