Posts

Showing posts with the label Datatable

DataTables warning: table id=table - Cannot reinitialise DataTable. For more information about this error,

I have gone trough following error number of time when I'm using Jquery Data table. DataTables warning: table id=table - Cannot reinitialise DataTable. For more information about this error,  I have a combo box in the page which lead re bind the Jquary Datatable ,while  table is already bind with data. Flowing solutions are possible to resolve the issue. Destroy the table before re bind it . $("#table").dataTable().fnDestroy();  If condition                                    if ( $.fn.dataTable.isDataTable('#table') ) { table = $('#table').DataTable(); } else { table = $('#table').DataTable( { } );

jQuery Datatable with the ajax Json String

Image
You  can integrate  jQuery Datatable with the ajax source in following way. Download Realse Packages  https://datatables.net/download/ Import JS and CSS <script src="public/js/jquery.dataTables.min.js" type="text/javascript"></script>  <link href="public/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/> HTML    <div class="col-md-12 table-responsive">                        <!-- <table id="table" class="table  table-bordered table-striped ">-->    <table id="table" class="table table-striped table-hover dt-responsive display nowrap" width="100%" cellspacing="0" >                             <thead>                                 <tr>...