Print ID number into string ?
Print ID number into string ?
adeguntoro
Posts: 3Questions: 2Answers: 0
I have a table, it contain with few ID. For example, if ID = 3, we call it village, and if ID = 4, we call it sub district. I use this code :
$(document).ready(function() {
$('#table_kelurahan').DataTable ({
ajax: {
url : "deffer.php",
dataSrc : ""
},
columns: [
{
"data": null,
"defaultContent": "",
"targets": -1
},
{ data: "provnama" },
{ data: "kabnama" },
{ data: "kecnama" },
{ data: "kelnama" },
{ data: "id_jenis" }
],
deferRender: true,
responsive: true,
lengthMenu: [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
});
})
So, how i can print my id from number (3 or 4), into something like ( village and sub district ) in datatable ?
This discussion has been closed.
Answers
You can use
columns.render
for this.Kevin