I have the following code
$("#datatable").dataTable({
"ajax": {
"url": "http://some data source/",
"dataSrc" : "",
"columnDefs": [ {
"render": function ( data, type, col ) {
return data +' ('+ col[3]+')';
},
"targets": 0
} ]
}
});
My Ajax data is just an array without the "data" attribute. I can see the data retrieved and displayed on the data table. However, the columnDefs was never called. Please help.
Also, there is data returned which I don't want to display. I assume I will need to create another columnDefs for that column and set visible to false?