I work on razor page asp.net core . I face error Datable id=example can't reinitialize data table ?
so How to solve this error please ?
error happen when change select option printer server
I need when change select on select option printer server then hide or remove table with pagination option first ,next,previous,last etc
error happen on block below
var tableShows = $('#example').DataTable({
paging: false
});
// Hide the table using jQuery
$('#example').hide();
$('#example').DataTable();
if ($.fn.dataTable.isDataTable('#example')) {
$('#example').destory();
// The DataTables instance is already initialized
} else {
// Initialize the DataTables plugin
$('#example').DataTable();
}
image for what i need

Amit MohantyPosted Jul 12, 2023, 5:29 AM
Try this