slow loading incase of large number of records
slow loading incase of large number of records
Newinthezone
Posts: 22Questions: 0Answers: 0
Hi
I am using datatables in which there are more than 20,000 records. It takes way to long to load and usually the browser hangs.
I am using a gridview to display data.
Is there any way through which it could just load the data for the current page being viewed rather than all the 20,000 records
I am using datatables in which there are more than 20,000 records. It takes way to long to load and usually the browser hangs.
I am using a gridview to display data.
Is there any way through which it could just load the data for the current page being viewed rather than all the 20,000 records
This discussion has been closed.
Replies
http://datatables.net/usage/server-side :-)
However, you might want to consider using Scroller + deferred rendering as koosvdkolk suggests. That will allow you to load all records in a single Ajax call, but it optimised for large data sets. Server-side processing however can be used for millions of rows, if you want to think about that, since all the "hard work" is done by the SQL engine.
Allan
I was trying to use server side processing and even the scroller.
But I am getting this error:
"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error"
Originally my data is coming from a sql datasource. WebForm4.aspx is the page where all the data is being displayed. What may be going wrong. What is needed in the "sAjaxSource"?
$(document).ready(function () {
var oTable = $('#GridView1')..dataTable({
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "WebForm4.aspx",
"oLanguage": {
"sSearch": "Search all columns:"
}
});
Allan
I have been trying to get the return value for json. Under the Net section of firebug where the post back link appears , there is no JSON tab for all the postback links.
What could this mean?
Allan
Under the response headers , it says :
Content-Length 13286
Content-Type text/html; charset=utf-8
under request header
Content-Type application/x-www-form-urlencoded
I hope this is what you meant.
This is the post back :[quote] http://localhost:47284/WebForm4.aspx?_=1335274950100&sEcho=1&iColumns=3&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&iSortingCols=1&iSortCol_0=0&sSortDir_0=asc&bSortable_0=true&bSortable_1=true&bSortable_2=true.
[/quote]
there is nothing under the JSON tab.