Performance Issues with IE8 + DeferRender + Ajax - Part 3
Performance Issues with IE8 + DeferRender + Ajax - Part 3
layda7
Posts: 3Questions: 0Answers: 0
Lastly my document.ready:
[code]
table = $('#tbl').dataTable({
"bPaginate": false,
"bProcessing": true,
"sScrollY": "725px",
"sDom": "frtiS",
"bDeferRender": true,
"sAjaxSource": ajaxGetData, // Calling a PageMethods --- Page1.aspx/GetData
"aoColumns" : cols,
"aoColumnDefs": colsdef,
"fnServerData": function (sSource, aoData, fnCallback) {
RetrieveData(sSource, aoData, fnCallback);
},
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$('td:eq(4)', nRow).addClass(aData["buySell"]); // Add Background Color
$('td:eq(6)', nRow).addClass(aData["col9"] == 0 ? "ZERO" : "NumericValue");
$('td:eq(7)', nRow).addClass(aData["col10"] == 0 ? "ZERO" : "NumericValue");
$('td:eq(8)', nRow).addClass(aData["col11"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(9)', nRow).addClass(aData["col12"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(10)', nRow).addClass(aData["col13"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(11)', nRow).addClass(aData["col14"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(12)', nRow).addClass(aData["col15"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(13)', nRow).addClass(aData["col16"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(14)', nRow).addClass(aData["col17"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(15)', nRow).addClass(aData["col18"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(16)', nRow).addClass(aData["col19"] >= 0 ? "NumericPos" : "NumericNeg");
}
});
[/code]
I can't figure out why it take a long time for the page to render.
On a separate topic, how do I get dataTables to invoke the same Ajax Methods as part of Auto-Refresh? I tried to use fnReloadAjax() but when debugging with VS2010, the breakpoint on the server-side code is never hit and the code is never executed but on the Browser, the processing indicator appears. The same section of code did get executed on the first load.
Any help is appreciated.
Thank You.
Best Regards,
Daniel
[code]
table = $('#tbl').dataTable({
"bPaginate": false,
"bProcessing": true,
"sScrollY": "725px",
"sDom": "frtiS",
"bDeferRender": true,
"sAjaxSource": ajaxGetData, // Calling a PageMethods --- Page1.aspx/GetData
"aoColumns" : cols,
"aoColumnDefs": colsdef,
"fnServerData": function (sSource, aoData, fnCallback) {
RetrieveData(sSource, aoData, fnCallback);
},
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$('td:eq(4)', nRow).addClass(aData["buySell"]); // Add Background Color
$('td:eq(6)', nRow).addClass(aData["col9"] == 0 ? "ZERO" : "NumericValue");
$('td:eq(7)', nRow).addClass(aData["col10"] == 0 ? "ZERO" : "NumericValue");
$('td:eq(8)', nRow).addClass(aData["col11"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(9)', nRow).addClass(aData["col12"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(10)', nRow).addClass(aData["col13"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(11)', nRow).addClass(aData["col14"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(12)', nRow).addClass(aData["col15"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(13)', nRow).addClass(aData["col16"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(14)', nRow).addClass(aData["col17"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(15)', nRow).addClass(aData["col18"] >= 0 ? "NumericPos" : "NumericNeg");
$('td:eq(16)', nRow).addClass(aData["col19"] >= 0 ? "NumericPos" : "NumericNeg");
}
});
[/code]
I can't figure out why it take a long time for the page to render.
On a separate topic, how do I get dataTables to invoke the same Ajax Methods as part of Auto-Refresh? I tried to use fnReloadAjax() but when debugging with VS2010, the breakpoint on the server-side code is never hit and the code is never executed but on the Browser, the processing indicator appears. The same section of code did get executed on the first load.
Any help is appreciated.
Thank You.
Best Regards,
Daniel
This discussion has been closed.