Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1817

mRender giving an initial error

$
0
0
I am using the mRender to display a count (not coming back in my ajax call) and a button (using a value in my data that I am not displaying). When i initially load the page, I get the following error: "DataTables warning (table id = 'example'): Requested unknown parameter '1' from the data source for row0."

After I get the error though, the page does display correctly. How do I get rid of the error?

Here is my ajax call:
success:function(data){
oTable = $('#example').dataTable( {
"bProcessing": true,
"aaData": data,
"aoColumns": [
{
"mData": null,
"sClass": "control center",
"sDefaultContent": '<img src="'+sImageUrl+'details_open.png'+'">'
},
{ "mRender": function(data,type, row) {
return getProjectCount(row.prg_guid);
}
},
{ "mData": "prg_name" },
{ "mData": "market" },
{ "mData": "beta_date" },
{ "mData": "rtc_date" },
{ "mRender": function(data, type, row) {
if (row.prj_guid != ""){
return "<a target='_blank' href='https://ifp.wdf.sap.corp/sap/bc/webdynpro/sap/cprojects?View=Projects&OBJECT_TYPE=DPO&GUID="+row.prj_guid+"&DetailView=DPO&sap-language=en'; class='btn btn-primary btn-sm '>Open in cPro</a>";
} else
return "No cPro";
}
}

]
} );
}

I am hopefully using the mRender properly.....

Viewing all articles
Browse latest Browse all 1817

Trending Articles