How to validate if column is exist or not in fnRender
How to validate if column is exist or not in fnRender
mohaideen
Posts: 10Questions: 3Answers: 0
I am getting information from ajax. In fnRender method, i have showing the data in table
I have writing code in aoColumns like
{
"sTitle": "Branch Address",
"mData":"branchAddress",
"fnRender":function(oObj){
if(typeof(oObj.aData.branchAddress)!= "undefined") {
return oObj.aData.branchAddress;
}else{
return "Not Added";
}
}
}
Here data showing correctly. If column present, showing data, otherwise shows "not added"
But during load the datatable, shows error "Requested Unknown Parameter branchAddress from the data source for row 0"
This discussion has been closed.