fnAddData Warning: Requested unknown parameter '4' from the data source for 'row#'
fnAddData Warning: Requested unknown parameter '4' from the data source for 'row#'
BettaUseYoNikes
Posts: 1Questions: 0Answers: 0
I am using fnAddData to dynamically add rows to the DataTable, some of the columns happen to be null values at times. Below is an example of adding my rows.
[code]
$('#table').dataTable().fnAddData( [
'',
callnumb1,
elaptime1,
priority1,
zone1,
type1,
addrrmks1
]);
[/code]
Rather than doing checks to see whether some columns are null before and giving them a placeholder I am trying to avoid that extra spew of if statements and allow some columns default to be null. I have added the following 3 lines to the "aoColumnDefs" section for those columns that may be null but unfortunately I am still getting the warnings, is there any way around this?
"mDataProp": null,
"sDefaultContent": "Edit",
"aTargets": [ -1 ]
[code]
$('#table').dataTable().fnAddData( [
'',
callnumb1,
elaptime1,
priority1,
zone1,
type1,
addrrmks1
]);
[/code]
Rather than doing checks to see whether some columns are null before and giving them a placeholder I am trying to avoid that extra spew of if statements and allow some columns default to be null. I have added the following 3 lines to the "aoColumnDefs" section for those columns that may be null but unfortunately I am still getting the warnings, is there any way around this?
"mDataProp": null,
"sDefaultContent": "Edit",
"aTargets": [ -1 ]
This discussion has been closed.