row.add not working in columnsDefs
row.add not working in columnsDefs

Iam getting error when running this code, please help. im using columnsDefs
Uncaught TypeError: Cannot read property 'substring' of undefined
var table = $('#queueTable').DataTable({
"bFilter": true,
"bLengthChange": false,
"oLanguage": { "sSearch": "" },
"ajax": {
"url": "http://localhost/site",
"dataSrc": ""
},
"columnDefs": [
{
"targets": 0,
"data": function ( row, type, val, meta ) {
return row.queue_no;
}
} ]
});
var counter = 1;
$('#addRow').on( 'click', function () {
table.row.add( [
counter +'.1'
] ).draw( false );
counter++;
} );
This discussion has been closed.