Server Side DataTable with DataTable API
Server Side DataTable with DataTable API
![M7mdAb](https://secure.gravatar.com/avatar/1b62ae417df2e4384aaa0c88b27b139b/?default=https%3A%2F%2Fvanillicon.com%2F1b62ae417df2e4384aaa0c88b27b139b_200.png&rating=g&size=120)
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
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 thereforerows().nodes()
androws().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
Thank you Colin for fast response and wise explination. Everything is clear now.