paginator set default number to 10

paginator set default number to 10

bernhardbernhard Posts: 2Questions: 0Answers: 0
edited July 2012 in Plug-ins
I use the paginator to paginate my table. There are a lot of rows in it. (2000+) I want to have the table by default paginated into 10 rows per page. but what happens is that all items are shown. How can I change this?

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    edited July 2012
    Can you give us some code?

    Did you set bPaginate to false? (which is wrong, it should be true)? You might also want to check iDisplayLength.
  • bernhardbernhard Posts: 2Questions: 0Answers: 0
    ('#thissorttable').dataTable( {
    "bPaginate": true,
    "bLengthChange": true,
    "bFilter": true,
    "bSort": true,
    "bInfo": true,
    "bAutoWidth": true,
    "oLanguage": {
    'sSearch': "",
    'sZeroRecords': "Geen records gevonden",
    "sLengthMenu": 'Bekijk  '+
    '10'+
    '20'+
    '30'+
    '40'+
    '50'+
    'All'+
    '    '
    }
    } );
  • allanallan Posts: 63,497Questions: 1Answers: 10,470 Site admin
    The default is 10 (see example on the home page: http://datatables.net/ ), so my guess is you have a script error. What does Firebug / Inspector say?

    Allan
This discussion has been closed.