Datatables warning (tableid=’MasterTable’): Requested unknown parameter ‘AreaId’ from the datasource

Datatables warning (tableid=’MasterTable’): Requested unknown parameter ‘AreaId’ from the datasource

shailyshaily Posts: 8Questions: 0Answers: 0
edited June 2012 in DataTables 1.9
i am using datatables 1.9.1 .

i am able to find 2 columns ,but for last column i am getting this error "Datatables warning (tableid=’MasterTable’): Requested unknown parameter ‘AreaId’ from the datasource "

this is my javascript file

var oTable_Common_Areas;
var jsonParse = [];
var AreaList = new Array();

$(document).ready(function () {
$("#btngetareas")
.click(function () {
debugger;

GetCommon_Areas();
LoadDataTable();
});
});


function LoadDataTable() {
return $("#MasterTable").DataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "../../Images/copy_cvs_xls_pdf.swf"
},
"aoColumns": [
{"mDataProp": "CityID" },
{ "mDataProp": "AreaName" },
{ "mDataProp": "AreaID" }
],
"aaData": AreaList
});
}

function GetCommon_Areas() {


$.ajaxSetup({ async: false });
$.post("../Home/GetArea", {}, function (Data) {

AreaList = eval(Data);
debugger;
});
debugger;

$.ajaxSetup({ async: true });

}


where GetArea function is returning string which is in json format.For AreaName of AreaList , i am getting error that children could not be evaluated , although i am getting value of Areaname of Arealist properly.



***********************************

this is my .aspx file

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;












ResultView













CityID
AreaName
AreaID









****************************
please expert help me out to solve this problem.

this is my datatablesdebugger link: http://debug.datatables.net/obaduf
This discussion has been closed.