refer this example and correct the errors, make sure you have defined extra two th in the header of the table.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="http://localhost:45673/dt/buttons.dataTables.min.css" rel="stylesheet" />
<link href="http://localhost:45673/dt/jquery.dataTables.min.css" rel="stylesheet" />
<script src="http://localhost:45673/dt/jquery-1.12.4.js"></script>
<script src="http://localhost:45673/dt/jquery.dataTables.min.js"></script>
<script src="http://localhost:45673/dt/dataTables.buttons.min.js"></script>
</head>
<body>
<table id="MyTable" style="width:400px">
<thead>
<tr>
<th>Slno</th>
<th>Contact</th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody></tbody>
</table>
<script>
var input = [{ Id: 1, Contact: 'aa' },
{ Id: 2, Contact: 'bb' },
{ Id: 3, Contact: 'cc' }]
$('#MyTable').DataTable({
"aaData": input,
"columns": [{ "data": "Id", sortable: false },
{ "data": "Contact", sortable: false },
{
mRender: function (data, type, row) {
return '<a href="#" class="table-edit" data-id="Id" onclick="Edit(' + row.Id + ')">EDIT</a> / <a href="#" class="editor_remove" onclick="Delete(' + row.Id + ')">Delete</a>'
}
}
]
});
</script>
</body>
</html>