DataTables warning: table id=example - Cannot reinitialise DataTable. For more information

DataTables warning: table id=example - Cannot reinitialise DataTable. For more information

periyasamymperiyasamym Posts: 1Questions: 1Answers: 0
edited November 2017 in Free community support

I am using angular 4 with data table ... Right side scroll bar is not working. When I add this the in my data table I am getting this error. how can I solve this?
this is my code

$(document).ready(function() {
    $('#example').DataTable( {
        "scrollX": true
    } );
} );

<table id="example" class="display nowrap" cellspacing="0" width="100%">

I am getting a message in an alert on my browser "DataTables warning: table id=example - Cannot reinitialise DataTable. For more information"

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    Did you follow the steps in the tech note linked in the error?

    Sounds like you are trying to initialize Datatables more than once.

    Kevin

This discussion has been closed.