Serverside, default to mid table

Serverside, default to mid table

QuesnelJQuesnelJ Posts: 25Questions: 4Answers: 0

I've implemented the serverside demo provided somewhere here-in, and everything seems to work quite well.

I'm trying to get the default view to start somewhere in the middle of my table. So, I set iDisplayStart to where I want, say 500. The data displays properly, but at top it still sais "Showing 1 to 50 of 25,937 entries" as oppose to "Showing 500 to 550 of 25,937 entries". Also, the page navigation at the bottom still default to 1 as oppose to 10 or so.

Any idea how I can get all parts to sync-up?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,337Questions: 26Answers: 4,954
    edited May 2023 Answer ✓

    The displayStart option works in this server side processing example:
    https://live.datatables.net/qoliyehi/27/edit

    Possibly you are setting it incorrectly or have it in the wrong spot and its not taking effect.
    Can you post a link to your page or a test case replicating the issue so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • QuesnelJQuesnelJ Posts: 25Questions: 4Answers: 0

    You are correct. I was setting it in the wrong spot. I was setting it in my server side AJAX script as a default value. I moved it to the table definition as per you latest example and everything runs as expected.

    Makes me wonder on the need for a default value in the server side AJAX script... But hey...

    Very much appreciated.

Sign In or Register to comment.