Hi,
I have created table like this
$(document).ready(function () {
$('#tbldocApproved').DataTable({
"lengthMenu": [[5, 25, 50, -1], [5, 25, 50, "All"]],
"pagingType": "simple_numbers",
destroy: true
});
});
after inserting/updating record I can make those changes on particular row using
$(rowid).remove() //// and so on
problem:
I want to refresh datatable, I am trying to use like this "tbldocApproved'" its id of html table which is created like this
<div style="background-color: transparent; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #333333; font-family: " segoe ui","lucida grande",verdana,arial,helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #333333;"> <table id="tbldocApproved" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%"></div> <div style="background-color: transparent; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #333333; font-family: " segoe ui","lucida grande",verdana,arial,helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #333333;">---
---
</table>
I used this to refresh datatable:
var ref = $('#tbldocApproved').DataTable();
</div>ref.ajax.reload(null, false);
its giving below error
"Datatable warning:table I="tbldocapproved-invalid json response.for more information about this error please see http:datables.net"