datatables warning(table id='Area table'):Requested unknown parameter 'Category_id' from the data so
datatables warning(table id='Area table'):Requested unknown parameter 'Category_id' from the data so
shaily
Posts: 8Questions: 0Answers: 0
i am getting this error.
datatables warning(table id='Area table'):Requested unknown parameter 'Category_id' from the data source for row 0
************************************
this is my js file
var AreaList = new Array();
var oTable_Area;
var Id_Area = null;
var UpdateData_Area;
var flag_Area = 0;
var aPos_Area;
var cityList_Area = new Array();
var stateList_Area = new Array();
var countrylist_Area = new Array();
var ArealistAC_Area = new Array();
var arr = new Array();
$(document).ready(function () {
GetArea();
//BindCountries();
LoadCommonDataTable();
oTable_Area = LoadDataTable();
// oTable_Area.fnAddData(arr);
//SearchAC("#AreaTable", ArealistAC_Area);
});
function LoadDataTable() {
return $("#AreaTable").DataTable({
// "sDom": 'T<"clear">lfrtip',
// "oTableTools": {
// "sSwfPath": "../../Images/copy_cvs_xls_pdf.swf"
// },
"aoColumns": [
// { "mDataProp": "Id", "bVisible": false, "bSearchable": false },
// { "mDataProp": "CityId", "bVisible": false, "bSearchable": false },
// { "mDataProp": "StateId", "bVisible": false, "bSearchable": false },
// { "mDataProp": "CountryId", "bVisible": false, "bSearchable": false },
{"mDataProp": "Category_id"},
{ "mDataProp": "Category_name" }
// { "mDataProp": "CityName" },
// { "mDataProp": "StateName" },
// { "mDataProp": "CountryName" }
],
"aaData": AreaList.d
});
}
function GetArea() {
$.ajaxSetup({ async: false });
// $.post("WebForm1.aspx/SelectAllCategory", {}, function (Data) {
// debugger;
// AreaList = eval(Data);
// });
alert("getarea");
$.ajax({
type: "POST",
url: "WebForm1.aspx/SelectAllCategory",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (Data) {
AreaList = eval(Data);
}
});
$.ajaxSetup({ async: true });
datatables warning(table id='Area table'):Requested unknown parameter 'Category_id' from the data source for row 0
************************************
this is my js file
var AreaList = new Array();
var oTable_Area;
var Id_Area = null;
var UpdateData_Area;
var flag_Area = 0;
var aPos_Area;
var cityList_Area = new Array();
var stateList_Area = new Array();
var countrylist_Area = new Array();
var ArealistAC_Area = new Array();
var arr = new Array();
$(document).ready(function () {
GetArea();
//BindCountries();
LoadCommonDataTable();
oTable_Area = LoadDataTable();
// oTable_Area.fnAddData(arr);
//SearchAC("#AreaTable", ArealistAC_Area);
});
function LoadDataTable() {
return $("#AreaTable").DataTable({
// "sDom": 'T<"clear">lfrtip',
// "oTableTools": {
// "sSwfPath": "../../Images/copy_cvs_xls_pdf.swf"
// },
"aoColumns": [
// { "mDataProp": "Id", "bVisible": false, "bSearchable": false },
// { "mDataProp": "CityId", "bVisible": false, "bSearchable": false },
// { "mDataProp": "StateId", "bVisible": false, "bSearchable": false },
// { "mDataProp": "CountryId", "bVisible": false, "bSearchable": false },
{"mDataProp": "Category_id"},
{ "mDataProp": "Category_name" }
// { "mDataProp": "CityName" },
// { "mDataProp": "StateName" },
// { "mDataProp": "CountryName" }
],
"aaData": AreaList.d
});
}
function GetArea() {
$.ajaxSetup({ async: false });
// $.post("WebForm1.aspx/SelectAllCategory", {}, function (Data) {
// debugger;
// AreaList = eval(Data);
// });
alert("getarea");
$.ajax({
type: "POST",
url: "WebForm1.aspx/SelectAllCategory",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (Data) {
AreaList = eval(Data);
}
});
$.ajaxSetup({ async: true });
This discussion has been closed.
Replies
Allan
debug code: ulayet
plz help me out.i am stucked here.
i am nt finding why datatable is nt binding.
thanks in advance
Allan
thanks for your reply.i am new to datatables so i am exactly not getting what you have answered.
can you please tell me in detail that where i am amking mistake?
Allan
allan tnx u so much.it is working now by using your solution