aData is undefined
aData is undefined
nagdatatables
Posts: 2Questions: 0Answers: 0
I am new to DataTables. I am getting the error while implementing the DataTables in asp.net .
The error is : "aData is undefined" in "jquery.dataTables.js" plz give me the solution.
Thanks in advance.
The error is : "aData is undefined" in "jquery.dataTables.js" plz give me the solution.
Thanks in advance.
This discussion has been closed.
Replies
Here is my Aspx code :
@import "css/demo_page.css"; @import "/media/css/header.ccss";
@import "css/demo_table.css";
$(document).ready(function () {
$('#tbl').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "ProcessAsyncCalls.aspx/GetEmployees",
"fnServerData": function (sUrl, aoData, fnCallback) {
$.ajax({
"type": "POST",
"url": sUrl,
"data":"{}",
"success": fnCallback,
"dataType": "json",
"contentType": "application/json; charset=utf-8",
"cache": false
});
}
});
});
ID
Name
Location
Loading data from server
The error shows in "jquery.dataTables.js" file
The below Webmethod is in ProcessAsyncCalls.aspx page
[WebMethod]
public static string GetEmployees()
{
var employee = new Employee();
var dataTable = employee.GetEmployees();
//var res = dataTable.ReadXml("ss").ToString();
return JsonMethods.GetJsonString(dataTable);
// return res;
}
what's the purpose of this?
and what is the return string/json?