default content edit in datatable code example
Example 1: datatable columns with nullable fields ajax
$('#table-id').DataTable({
ajax: {
url: 'https://someurl/endpoint',
type: "GET",
dataSrc: ''
},
columns: [
{
defaultContent: 'NA',
data: 'data_field_name'
}
]
});
Example 2: datatable default value
columns:
[
{ data: 'id', name:'id', defaultContent: ''},
],