sAjaxSource with Objected Json
sAjaxSource with Objected Json

Hi Allen,
In the previous edition of Datatables, the objected Json is not supported for sAjaxSource datasouce, is this problem fixed in the new edition?
eg:
[code] IList l = new MYERPBLL.CustomerService().GetAllCustomerArray();
return Json(new
{
sEcho = param.sEcho,
iTotalRecords = 50,
iTotalDisplayRecords = 50,
aaData = l
},JsonRequestBehavior.AllowGet);
[/code]
[code] $(function () {
$("#example").dataTable({
//"bServerSide": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"sAjaxSource": "/Home/AjaxHandler",
"bFilter" : false
// "aoColumns" : [
// { " sName " : " ID "},
// { " sName " : " COMPANY_NAME " },
// { " sName " : " ADDRESS " },
// { " sName " : " TOWN " }
// ]
});
});
[/code]
In the previous edition of Datatables, the objected Json is not supported for sAjaxSource datasouce, is this problem fixed in the new edition?
eg:
[code] IList l = new MYERPBLL.CustomerService().GetAllCustomerArray();
return Json(new
{
sEcho = param.sEcho,
iTotalRecords = 50,
iTotalDisplayRecords = 50,
aaData = l
},JsonRequestBehavior.AllowGet);
[/code]
[code] $(function () {
$("#example").dataTable({
//"bServerSide": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"sAjaxSource": "/Home/AjaxHandler",
"bFilter" : false
// "aoColumns" : [
// { " sName " : " ID "},
// { " sName " : " COMPANY_NAME " },
// { " sName " : " ADDRESS " },
// { " sName " : " TOWN " }
// ]
});
});
[/code]
This discussion has been closed.
Replies
Allan