Insert two json data to custom columns
Insert two json data to custom columns
coisox
Posts: 4Questions: 3Answers: 0
I have 3 columns. I need the last column to have data from the first two columns
dt = $('#datatables').DataTable({
ajax: "api/getData.php",
columns: [
{ "data": "id" },
{ "data": "desc" },
{ "data": null, "defaultContent":
'<div id="'+data.id+'">'+data.desc+'</div>'
}
]
});
This discussion has been closed.
Answers
base on https://datatables.net/reference/option/columns.render do this
Thank you. Its working. And I also take a look at the link you gave but your example is much clearer.