How to limit the displayed entries per page without desactivating the pagging.

How to limit the displayed entries per page without desactivating the pagging.

NegadaNegada Posts: 5Questions: 2Answers: 0

Hello,

I would like to set a default number of entries shown per page (page length) without giving the user the option to set the page length with the toolbar combobox. What is the best way to do that?

Thanks in advance.

Regards Negada.

Answers

  • allanallan Posts: 63,822Questions: 1Answers: 10,517 Site admin

    without giving the user the option to set the page length with the toolbar combobox.

    Use the pageLength option to disable that feature.

    Allan

  • NegadaNegada Posts: 5Questions: 2Answers: 0

    Thanks Allan for the answer.

    if i disable the feature i dont have pagination anymore, but i do want to set a fix pageLength. Lets say i always want to have 10 entries per page and i dont want the toolbar combobox, how can i achieve that?
    is there a simple way for it or should i change the main script for that?

    Regards, Negada.

  • NegadaNegada Posts: 5Questions: 2Answers: 0

    Ok i got it:
    the combination of the two options did it.

    "pageLength": 10,
    "lengthChange": false

    Thank you

    Regards, Negada.

  • allanallan Posts: 63,822Questions: 1Answers: 10,517 Site admin

    Sorry! lengthChange is the option I should have mentioned: http://live.datatables.net/fitezipi/1/edit .

    Allan

This discussion has been closed.