How to set the start value in DataTable after a request?

How to set the start value in DataTable after a request?

KahdulKahdul Posts: 1Questions: 1Answers: 0

Description of problem:

I have a DataTable setup, but the value of the start parameter used for pagination follows specific business rules, so it doesn't increment sequentially with each page. Instead, I need to receive this start value from the server response after each request and use it in the subsequent requests for pagination.

How can I dynamically set the start value in the DataTable based on the server response, and ensure that this updated start value is sent correctly in the next AJAX request?

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    Use the page() and page.len() methods together. There isn't an API to say "start at record X", you need to say "show page Y, where each page is Z records long".

    Allan

Sign In or Register to comment.