2

I'm using jquery.dataTables.min.js for pagination. It shows 10 data in 1 page by default. I want to sort with the page with showing 20, 30 data.

How do I change the number of data shown in a single page?

Mat
  • 202,337
  • 40
  • 393
  • 406
anstrangel0ver
  • 1,073
  • 8
  • 17

2 Answers2

3

try using

"iDisplayLength" : yourValue

suppose you need 25 records to be displayed, then use:

$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers",
"iDisplayLength" : 25
} );
});
Sudeep
  • 109
  • 7
2

you can use some thing like this

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