changing the number of records per page dynamically.

changing the number of records per page dynamically.

JanurajJanuraj Posts: 85Questions: 18Answers: 0

on page load the pageLength is 10.
I am changing the number of records per page dynamically.
After getting the results still the pagination links are shown as per the default pagelength

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,769
    Answer ✓

    I may be misunderstanding but when using page.len() to change the page size the length menu option changes. See this example:
    http://live.datatables.net/piweyude/1/edit

    Please update the example to show the problem you are having.

    Kevin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0

    @kthorngren , thanks for this test case.
    I have one more problem:
    how to get the page number and send it in the custom ajax request on clicking on the page number?

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    page().info() returns full info about the paging,

    Colin

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0
    edited November 2020

    what is the event handler which i can use when clicked on the pages in the pagination?

  • JanurajJanuraj Posts: 85Questions: 18Answers: 0

    @colin Thanks i have resolved the problem using the page.info()

  • LapointeLapointe Posts: 430Questions: 81Answers: 4

    hi
    please mark the question as answered...

This discussion has been closed.