fnRender error in 1.9.3
fnRender error in 1.9.3
I recently upgraded to 1.9.3 and started getting this error: DataTables warning (table id = 'Forecast'): Requested unknown parameter '2' from the data source for row 0.
I only get this error on the very first row, it occurs before the render function is called and after the description column has been added to the celldata.
[code]
'aoColumns': [
{ 'mDataProp': 'dateText' },
{ 'mDataProp': 'desciption' },
{ 'mDataProp': null, fnRender : function(o, val) { return ""; }, 'bSortable': false, 'bSearchable': false },
{ 'mDataProp': 'probabilityOfPrecipiation.daytime' },
{ 'mDataProp': 'temperatures.daytimeHigh' }
],
[/code]
What am I doing wrong?
PS: How do I stop the link around fnRender function?
I only get this error on the very first row, it occurs before the render function is called and after the description column has been added to the celldata.
[code]
'aoColumns': [
{ 'mDataProp': 'dateText' },
{ 'mDataProp': 'desciption' },
{ 'mDataProp': null, fnRender : function(o, val) { return ""; }, 'bSortable': false, 'bSearchable': false },
{ 'mDataProp': 'probabilityOfPrecipiation.daytime' },
{ 'mDataProp': 'temperatures.daytimeHigh' }
],
[/code]
What am I doing wrong?
PS: How do I stop the link around fnRender function?
This discussion has been closed.
Replies
[code]
'aoColumns': [
{ 'mDataProp': 'dateText' },
{ 'mDataProp': 'desciption' },
{ fnRender : function(o, val) {
return "";
},
'bSortable': false, 'bSearchable': false
},
{ 'mDataProp': 'probabilityOfPrecipiation.daytime' },
{ 'mDataProp': 'temperatures.daytimeHigh' }
],
[/code]
But if I define it as a valid value then the error goes away and the val parameter to render contains the value of that attribute:
[code]
'aoColumns': [
{ 'mDataProp': 'dateText' },
{ 'mDataProp': 'desciption' },
{ 'mDataProp': 'web.pictureURL',
fnRender : function(o, val) {
return "";
},
'bSortable': false, 'bSearchable': false
},
{ 'mDataProp': 'probabilityOfPrecipiation.daytime' },
{ 'mDataProp': 'temperatures.daytimeHigh' }
],
[/code]