I am trying to implement DataTables.net 1.10.9 (http://datatables.net) in asp.net web forms. Its works great with small amount of data but it delays rendering and applying paging on web page.
I am using Repeater control and binding it in code behind page at runtime.
When page is loaded, i can see all the data in table but page is still in process and after 5-8 seconds delay paging and theme is applied on the table.
Is there any work around to reduce the rending time? (without using server side webservice)
So far i have tried using "deferRender": true but no luck.
Working okay in firefox and google chrome but delay is in IE9
SOLUTION
Use deferRender
to defer rendering of non-visible rows for additional speed of initialization.
Please note that this will improve performance only for Ajax or JavaScript sourced data (i.e. when using ajax
or data
options).
var table = $('#example').DataTable({
ajax: 'https://api.myjson.com/bins/qgcu',
deferRender: true
});
If you're using HTML sourced data, consider writing a script that will produce JSON with the data. Then you can specify the path to the script with ajax
option and use deferRender: true
as shown above to improve performance.
DEMO
See this jsFiddle for code and demonstration.
LINKS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With