How to add multiple json values in a single cell of dataTable. I am going through the datatables documentation but cant get a clear example.
I have the following JSO
Prior to DataTables 1.10.x, you could use the mRender parameter like this:
"aoColumns":[
{"mData":"LastName",
"sClass":"left",
"mRender":function(data, type, full){
return full.FirstName + full.LastName + full.MiddleInitial;
}
},
{"mData":"ServiceDate","sClass":"left"},
{"mData":"ChargeAndDx","sClass":"left"},
{"mData":"BillingProvider","sClass":"left"},
{"mData":"null","sClass":"center","sDefaultContent":"<a href='' class='editor_menu'>menu</a>"}
]
Starting from DataTables 1.10.x, you could use the columns.render property like this:
"columns":[
{"data":"LastName",
"className":"left",
"render":function(data, type, full, meta){
return full.FirstName + full.LastName + full.MiddleInitial;
}
},
{"data":"ServiceDate","sClass":"left"},
{"data":"ChargeAndDx","sClass":"left"},
{"data":"BillingProvider","className":"left"},
{"data":"null","className":"center","defaultContent":"<a href='' class='editor_menu'>menu</a>"}
]