datatablesangular-datatablesangular13

DataTables warning: table id=DataTables_Table_1 - Cannot reinitialise DataTable In Angular 13


I have implemented jQuery Datatable Grid in Angular 13. But when I delete record and datatable is refreshed. then below error occurs.

DataTables warning: table id=DataTables_Table_1 - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3

Any Solution for this ??


Solution

  • After struggling for many hours, I found solution for this.

    just add destroy:true in this.dtOptions = {} like below

     this.dtOptions = {
          pagingType: 'full_numbers',
          pageLength: 10,
          scrollX: true,
          processing: true,
          deferRender: true,
          destroy:true
        };
    

    Error will be fixed. Thanks