Server-side processing with unknown iTotalRecords count
Server-side processing with unknown iTotalRecords count
datatables
Posts: 5Questions: 0Answers: 0
Does datatables have any support for server-side retrieving of data where the iTotalRecordscount is not known in advance?
We have data for which the query to get the total-count is almost as expensive as just querying all records. It would be need if there was a way to let datatables know that the iTotalRecords count is not known. Such functionality isn't documented. Is it supported?
We have data for which the query to get the total-count is almost as expensive as just querying all records. It would be need if there was a way to let datatables know that the iTotalRecords count is not known. Such functionality isn't documented. Is it supported?
This discussion has been closed.
Replies
Regards,
Allan
Allan
Allan
I'll have a think about how it might be implemented in future.
Regards,
Allan
I think the point would be to return a sentinel value like -1 (or to add a field like bMoreRecords) and then have the table disable the next page button. So, let's say they've paged in a ways, they click 'next page' again and instead of the 10 records requested, we can only get back 7 (we've reached the end of the table). We could then return a sentinel value or set bMoreRecords to false in our response. When DataTables sees that, it can disable the next page button.
That would basically be the 'bigtable way' of handling this.
" 1 - 20 of tens of thousands Older ›"