Server Side DataTable with DataTable API

Server Side DataTable with DataTable API

M7mdAbM7mdAb Posts: 2Questions: 0Answers: 0

Hello Team,
Thank you for this great library and support, it really comes in handy and very smart.
Getting to the point, I'm trying to use DataTable API, things like row().node(), rows().nodes(), row.data(), everything, but when I turn serverSide option on my table, it's like the API stops working, as soon as I trun this option to false, the API returns to work normally. Please, I need help. Thank you.

Replies

  • colincolin Posts: 15,234Questions: 1Answers: 2,597
    edited July 17

    When server-side processing is enabled, the only rows in the table are what you see - as that's all the server sends back. So if you have a page length of 10, for example, even if there are thousands of records in the table, rows() (and therefore
    rows().nodes() and rows().data()) would only return 10 entries.

    That's the benefit of server-side processing - it removes the need for large time-consuming queries or the transfer of bulky datasets - but, as you're seeing, there is a trade-off in that not all the data is available through the API.

    I hope that explains it - if not, please can you elaborate.

    And thanks for the kind words!

    Colin

  • M7mdAbM7mdAb Posts: 2Questions: 0Answers: 0

    Thank you Colin for fast response and wise explination. Everything is clear now.

Sign In or Register to comment.