How to add a value to the pagination option

How to add a value to the pagination option

nicola.peluchettinicola.peluchetti Posts: 10Questions: 0Answers: 0
edited August 2011 in General
Hi,

how can i add more options to the default pagination options?

I have 10, 25, 50, 100 and i need to add 500 and 1000

Thanks

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    use aLengthMenu, http://www.datatables.net/ref

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "aLengthMenu": [10, 25, 50, 100, 500, 1000]
    } );
    } );
    [/code]

    if you pass in 2 arrays (in an array), one set will be the display, the other will be the values. you can use special value -1 to mean "everything"

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "aLengthMenu": [[10, 25, 50, -1 ], [10, 25, 50, "All" ]]
    } );
    } );
    [/code]
This discussion has been closed.