I am using jQuery datatable to bind an asp.net gridview and I have to hide and show some rows.
It is working perfect but when I hide some rows from datatable the datatable paging is not updating so I have to rebind jquery datatable.
When I call the datatable function again it shows this error :-

I am using this code to show and hide..then rebind datatable
$('table.dataTable tbody tr').each(function () {
var name = $(this).find('.name').html();
if (name == str) {
$(this).show();
$('.Flight_class').dataTable({
"aaSorting": [[1, "asc"]],
"sPaginationType": "full_numbers",
"bJQueryUI": false,
"bAutoWidth": false,
"bLengthChange": false
});
}
else {
$(this).hide();
}
});