var table = $('#example').DataTable( {
ajax: "data.json"
} );
setInterval( function () {
table.ajax.reload();
}, 30000 );
$('#my-datatable').DataTable().ajax.reload();
// table.ajax.reload(callback, resetPaging)
table.ajax.reload(null, false)
table.ajax.reload(null, false)
$('#table').dataTable().fnClearTable();
$('#table').dataTable().fnAddData(data);
Javascript12345var table = $('#example').DataTable(); table.ajax.reload( function ( json ) { $('#myInput').val( json.lastInput );} );
table.ajax.reload(null, false)
//vbjhjhvdfvjhf
var refreshedDataFromTheServer = getDataFromServer();
var myTable = $('#tableId').DataTable();
myTable.clear().rows.add(refreshedDataFromTheServer).draw();
//declare this var
dtElement: DataTableDirective;
//create method and call it where ever you want to refresh your table
reload(): void {
this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => {
dtInstance.draw();
});
}