pageLength and displayLength issuse

pageLength and displayLength issuse

bbrindzabbrindza Posts: 316Questions: 73Answers: 1

In my DataTable initialization I wanted to change the pageLength and displayLength to 15 , but when I do the 'entries per page' does not show the number.

It works when I change it to 10. What wrong with using 15 entries per page?

               pageLength: 15,
           layout: {
                             top2Start: 'pageLength',
                             topStart: 'buttons',
                             topEnd: 'search',
                             bottomStart: 'info',
                            bottomEnd: 'paging'
        },
       fixedHeader: true,
        lengthMenu: [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], 
        displayLength: 15,
        paginationType: 'full_numbers',
            language: {search: 'Table Search: '},
            order: [[0, 'asc'], [6, 'asc']], 

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,299Questions: 26Answers: 4,944

    Try adding 15 to the lengthMenu option.

    Kevin

  • allanallan Posts: 63,441Questions: 1Answers: 10,459 Site admin
    Answer ✓

    Yup, exactly that. If you set it to a value that isn't in the list, it can't display it :)

    Allan

  • bbrindzabbrindza Posts: 316Questions: 73Answers: 1

    Duhoooo I missed that. Thanks fellows.

Sign In or Register to comment.