Defer render not working as expected
Defer render not working as expected
Hi! I'm using datatables with server side processing and I wanted to use deferred rendering to increase performance. But defered rendering brings no performance increase whatsoever. Is there something I'm missing from the picture ?
This is my initialization code:
oTable = $('#solutionsTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bSort": false,
"oLanguage": {
"sSearch": "Search all columns:"
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": '@Url.Action("AsyncGetUserData")',
"bDeferRender": true,
"aoColumns": [
//User
{ "mData": function(source, type, val){
var returnString = "Name: " +"" + source.userName + "" +
"
Type: " + "" + source.roleName + "
" +
"Status: " + "" + source.isActive + "";
return returnString;
}},
//Activity
{ "mData": function(source, type, val){
var returnString = "Logins Number: " + source.loginsNum +
"
Last Login: " + source.lastLogin;
return returnString;
}},
//Contact
{ "mData": function(source, type, val){
var returnString = "First Name: " + source.firstName +
"
Last Name: " + source.lastName +
"
Email: " + source.email +
"
Phone: " + source.phone;
return returnString;
}},
//Work
{ "mData": function(source, type, val){
var returnString = "Company: " + source.company +
"
Job title: " + source.job;
return returnString;
}},
//Address
{ "mData": function(source, type, val){
var returnString = "Country: " + source.countryName +
"
City: " + source.city +
"
Street: " + source.street +
"
Postcode: " + source.postcode;
return returnString;
}},
//Options
{ "mData": function(source, type, val){
var editUrl = '@Url.Action("Account", "CMS")' + '?userId=' + source.userID;
var returnString = "Edit
" +
"Delete";
return returnString;
}}
]
}).fnSetFilteringDelay();
Is there something I should be doing in the controller action ?
Thanks in advance
This is my initialization code:
oTable = $('#solutionsTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bSort": false,
"oLanguage": {
"sSearch": "Search all columns:"
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": '@Url.Action("AsyncGetUserData")',
"bDeferRender": true,
"aoColumns": [
//User
{ "mData": function(source, type, val){
var returnString = "Name: " +"" + source.userName + "" +
"
Type: " + "" + source.roleName + "
" +
"Status: " + "" + source.isActive + "";
return returnString;
}},
//Activity
{ "mData": function(source, type, val){
var returnString = "Logins Number: " + source.loginsNum +
"
Last Login: " + source.lastLogin;
return returnString;
}},
//Contact
{ "mData": function(source, type, val){
var returnString = "First Name: " + source.firstName +
"
Last Name: " + source.lastName +
"
Email: " + source.email +
"
Phone: " + source.phone;
return returnString;
}},
//Work
{ "mData": function(source, type, val){
var returnString = "Company: " + source.company +
"
Job title: " + source.job;
return returnString;
}},
//Address
{ "mData": function(source, type, val){
var returnString = "Country: " + source.countryName +
"
City: " + source.city +
"
Street: " + source.street +
"
Postcode: " + source.postcode;
return returnString;
}},
//Options
{ "mData": function(source, type, val){
var editUrl = '@Url.Action("Account", "CMS")' + '?userId=' + source.userID;
var returnString = "Edit
" +
"Delete";
return returnString;
}}
]
}).fnSetFilteringDelay();
Is there something I should be doing in the controller action ?
Thanks in advance
This discussion has been closed.
Replies
Allan