how can i change the selection box values, ie. by default it will display only 10 entries then 25 50

how can i change the selection box values, ie. by default it will display only 10 entries then 25 50

rajanikarajanika Posts: 3Questions: 1Answers: 0

i want to display 25 or 50 entries in table by default instead of 10. Is it possible...?
if Yes. Then how...? please help me out in this

Thank you

Answers

  • schiefersoftschiefersoft Posts: 7Questions: 2Answers: 2
    The Javascript shown below is used to initialise the table shown in this example:
    
    Javascript
    1
    2
    3
    4
    5
    $(document).ready(function() {
        $('#example').DataTable( {
            "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
        } );
    } );
    In addition to the above code, the following Javascript library files are loaded for use in this example:
    

    found her: https://datatables.net/examples/advanced_init/length_menu.html

  • allanallan Posts: 63,760Questions: 1Answers: 10,510 Site admin
    edited November 2015

    pageLength is the initial display length option.

    Allan

  • rajanikarajanika Posts: 3Questions: 1Answers: 0

    I found that code but how should i make the default value as 25 or 50 instead of 10?

  • rajanikarajanika Posts: 3Questions: 1Answers: 0

    Thanks lot.. I got it.

  • allanallan Posts: 63,760Questions: 1Answers: 10,510 Site admin

    pageLength for anyone else reading this.

    Allan

This discussion has been closed.