I am following this guide in order to add multiple data in my DataTables (js plugin) column:
https://datatables.net/forums/discussion/58795/add-multiple-value-in-column
Here is the specific column in question:
{ data: 'shift_name', name: 'shift_name', width: '15%',
"render": function ( data, type, row, meta )
{
return row.shift_name ? row.shift_name : 'N/A';
},
createdCell: function (td, cellData, rowData, row, col) {
return $(td).css({
'font-weight': "700"
});
}
},
The Output:
Now I am trying to add another data underneath shift_name
so here is what I tried first:
return row.shift_name ? row.shift_name : 'N/A' + '<br>hello';
The code above does not show the "hello" in each row
I also Tried adding a + at the start:
return + row.shift_name ? row.shift_name : 'N/A' + '<br>hello';
but for some reason my shift_name
data does not get read this way:
What is the correct way in adding multiple data in a row in my situation?