Change the default numbers in "show xx entries"

Change the default numbers in "show xx entries"

bordseniusbordsenius Posts: 5Questions: 0Answers: 0
edited September 2011 in General
Sorry if the question is stupid, but I have not found any way to set my own numbers here. In addition to the normal ones I would like to add 500 and 1000, and have the numebr 500 as default.

I have managed to set it to 500 by using the API, but the number is not visible in the select-box.

Replies

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    http://datatables.net/ref#aLengthMenu is the option you are looking for. For the default you need to use http://datatables.net/ref#iDisplayLength .

    Allan
  • bordseniusbordsenius Posts: 5Questions: 0Answers: 0
    I added these two lines to the init:

    "iDisplayLength": 500,
    "aLengthMenu": [[10, 25, 50, 100,500,1000,-1], [10, 25, 50,100,500,1000, "All"]],


    That did the trick. Thanks!
This discussion has been closed.