- We have applications that use thousands of records, and sometimes it is just cheaper in terms of server requests to get all the data in one shot. Get yourMessage 1 of 2 , Aug 27, 2009View SourceWe have applications that use thousands of records, and sometimes it is just cheaper in terms of server requests to get all the data in one shot. Get your array, pass it to the datasource and create your datatable with a paginator. We have use this technique with recordsets in excess of 20,000 records.
- Carlos Vadillo
Sent: Thursday, August 27, 2009 3:48 PM
I already posted this on YUI datatable forum, but just in case this group is more active, I am reposting it here.
Is it possible to add the json array on the same page where I want to datatable to be created?
Currently for server-side pagination type of datatable the data is sent from the server, even the initial data. This means that when the user visits an html page that contains the datatable widget, the datatable will request initial data upon page load, resulting in another call to server.
But I can just include the small script at the bottom of the same html page, call it like oInitialData and it will contain the json formatted rows of data. This way at least the initial ajax request back to the server is not necessary.
Has anyone already thought of that and found a way to populate the datasource with initial data this way?