$("#Table").DataTable().clear().destroy();
$("#Table").dataTable({
"sAjaxSource": '@Url.Action("YourMethod", "UrCOntrollerName")',
"bServerSide": true,
"bProcessing": false,
"searching" : false,
"columns": [
{
"data": "ID",
"autoWidth": true,
"searchable": false,
"mRender": function (arqs, type, data) {
return "<a href='#' onclick='RemoveCombine(this)' data-id='" + data.ID + "' class='btn-round-sm' title='Remove' style='padding: 5px 5px 5px 5px;'><span>Remove</span></a>";
}
},
jQuery("#LableDatatable").DataTable( {
destroy: true, // add this line to distory
responsive: true,
"ajax": {
"url": url,
"type": 'GET',
"data": data
}
});