Dynamically disable pagination

Dynamically disable pagination

TheSanchesTheSanches Posts: 2Questions: 1Answers: 0

How to dynamically disable pagination?
For example, click on the button to turn off pagination.
I tried to do this, but it didn't work.

{ text: 'Disable Pagination', className: 'qs-button', action: function () { table.paging(false).draw(); } }

Replies

  • allanallan Posts: 61,786Questions: 1Answers: 10,114 Site admin

    Use page.len() and set it to -1 to disable paging. If you then also want to remove the paging control from the page (it would just say 1 page), you could use a little Javascript to add display: none to it.

    Allan

Sign In or Register to comment.