Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82793

How to get from the server only what is being displayed.

$
0
0
So what I'm wondering, is if there is a way to set up data tables so that it still shows the proper pagination (for example if there are 57 records and 10 per page, it'd still show the page 1, page 2 ect buttons) but only make a request for the data that would be displayed. IE only make a request from the datasource for entries 1-10. The end behavior that I'm after is to make it so that any time someone does anything with the data, be it sorting the columns, making a query, switching pages, anything that it makes a call to the server to get the information with the proper information. A big part of the reason is what you've described on the server-side processing example on the front page, but I'd rather that the client tells the server only what it wants so that the server code can be reduced.

My thought was to basically query the datatables for things such as iDisplayLength and iDisplayStart to get all the information that I need to just make an ajax request myself and than redraw the table with new information, but I'm not entirely sure what properties I'd even need to be able to do that so I'm hoping there is a more clean way of doing something like this. Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 82793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>