Reputation: 179
I use a jquery datatable with a sAjaxSource and want to load data in col 1, col 2, col 3, col 4 in first way because in my datasource I have a json from a sql query with an execution time around 1 minute. In the second way, I want to load data in col 5, col 6, col 7 I have to show data in the datatable as far as possible I think of writing 2 queries for the 2 steps => 2 datasources, and load data in the datatable in 2 steps; is it possible and how? or what should I do?
Thanks!
Upvotes: 1
Views: 246
Reputation: 14863
How about this: http://datatables.net/usage/server-side
Server-side processing
There are times when reading data from the DOM is simply too slow or unwieldy, particularly when dealing with thousands or millions of data rows. To address this DataTables' server-side processing feature provides a method to let all the "heavy lifting" be done by a database engine on the server-side (they are after-all highly optimised for exactly this kind of thing), and then have that information drawn in the user's web-browser. As such you can display tables consisting of millions of rows with ease.
When using server-side processing, DataTables will make an XHR request to the server for each draw of the information on the page (i.e. when paging, sorting, filtering etc). DataTables will send a number of variables to the server to allow it to perform the required processing, and then return the data in the format required by DataTables.
Upvotes: 1