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

How do I pre-populate a datatable with data for the first page, but still use an ajax source?

$
0
0
I am using the sAjaxSource option to populate a datatable. When the table is initialised a request is made and the data appear on the table.

It works, but it takes 200 ms to fetch the data. I would like to avoid that on the first time the table is displayed. I would like to provide a starting dataset from which Datatable could show the first page, but also provide a sAjaxSource so that the user can load, using ajax, the other pages and search.

How can I do that?

I tried providing both aaData and sAjaxSource, but the aaData gets ignored and the data is always retrieved from the remote source.

How can I make Datatable use the aaData as the starting state, and then use the remote source for anything else?

Viewing all articles
Browse latest Browse all 82755

Trending Articles



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