I am Having JSON object from which i am creating Dynamic Columns. At 5th position i am having ID which i want to pass to Server. How do i achieve it on click of specific button
var jsonData=data[key[0]];
var column=data[key[1]];
$('#example').DataTable({
data: jsonData,
columnDefs: [
{
targets: 5,
render: function(data, type, full, meta){
if(type === 'display'){
data =
'<button class="btn-edit" type="button">Edit</button>'
+ '<button class="btn-delete" type="button">Delet</button>';
}
return data;
}
}
],
columns: column
});