mRender causes unknown parameter but without mRender it works fine

mRender causes unknown parameter but without mRender it works fine

jdixon86jdixon86 Posts: 3Questions: 2Answers: 0

I'm having an issue I can't seem to figure out and it is with one particular column.

These code examples are under "aoColumns".

This works:
{ "mData": "IsDefault", "bSortable": false, "bSearchable" false }

However I get "Requested unknown parameter 'IsDefault' from the datasource for row 0" when I do this:
{
"mData": "IsDefault", "bSortable": false, "bSearchable": false, "mRender": function (data) {
if (data == true)
return "<span class='glyphicon glyphicon-check'></span>"
}
}

Now the error occurs exactly when I try to access the "data". So if I leave out "if (data == true)" then it works fine with no error.

My json data is:
{"aaData":[{"DomainID":7,"CompanyCode":"LAR","Domain1":"largecompany.com","IsSubDomain":false,"IsDefault":false,"IsAcceptedDomain":true,"IsLyncDomain":null,"DomainType":0}],"iTotalRecords":1,"iTotalDisplayRecords":1}

This discussion has been closed.