User-939850651 posted
Hi jagjit saini,
{
"defaultContent": '<button id="btnEdit" type="submit"><i class="fa fa-pencil"></i></button>'
}
Which part of these codes are you given? If it is the render part, I think you only need to modify
<a> to <button> to achieve your requirements.
$('#example').DataTable({
data:result,
columns: [
{ data: "Code" },
{ data: "Name" },
{ data: "Street" },
{ data: "City" },
{ data: "State" },
{ data: "Zip" },
{ data: "Country" },
{ data: "Panno" },
{ data: "GstRegNo" },
{ data: "Mobile" },
{ data: "Phone_1" },
{ data: "Phone_2" },
{ data: "E_Mail" },
{
"data": null,
"render": function (value) {
return '<a href="#" onclick="return getbyID(' + value.Code + ')">Edit</a> | <a href="#" onclick="Delete(' + value.Code + ')">Delete</a>';
}
}
]
});
If I misunderstood something, could you provide more details?
Best regards,
Xudong Peng