Change ajax columns
Change ajax columns
soamazing
Posts: 1Questions: 1Answers: 0
Hello,
I'm, using ajax request to get data to make my datatables, but I need change de columns with html's tags and content.
My datatables resquest is:
var oTable1 = $('#sample-table-2').dataTable({
"language": {
"url": "/assets/js/Portuguese-Brasil.json"
},
"aoColumnDefs": [{
"bSortable": true, "aTargets": [0, 1, 2],
"bSortable": false, "aTargets": [1, 2]
}],
"ajax": {
"url": "/Clientes/GetClientes/",
"dataSrc": "",
"dataType": "json",
},
"columns": [
{ "data": "Nome" },
{ "data": "<strong>StatusDesc</strong>" },
{ "data": "<span>StatusDesc</span>" },
],
});
But when this table is render, the html code inside columns doen't work.
Thank you!
This discussion has been closed.