How do I pre-populate a datatable with data for the first page, but still use an ajax source?
How do I pre-populate a datatable with data for the first page, but still use an ajax source?
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?
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?
This discussion has been closed.