I want to stay on particular page after deleting the records in the datatable, but Ajax.reload() does not work here.
I have tried datatable ajax method.
<table class="table datatable-show-all" id="my-datatable">
<script type="text/javascript"
src="~/Scripts/plugins/forms/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="~/Scripts/datatables_advanced.js"></script>
success: function(flag) {
if (flag.flag === true) {
alert("Successfully deleted !");
$('#my-datatable').DataTable().ajax.reload(null, false);
}
}
When I Click the button it successfully deleted and reload the page if i use location.reload(). but I i want to reload the particular table in data table not The same page . I does not reload when i use above code.