title: How to Eliminate Datatables Warning(Cannot reinitialise DataTable)
body: <p>Hello i have created a table using the jquery datatable framework to display data.</p>
  
  <p>automatically my datables are sorted into a form in which i do not want</p>
  
  <p>so i did some research on how to disable sorting and then i get sorting disabled.</p>
  
  <p>the problem now is when i disabled sorting i get a funny error :</p>
  
  <p><em>"DataTables warning: table id=datatable - Cannot reinitialise DataTable. For more information about this error, please see <a href="http://datatables.net/tn/3" rel="nofollow noreferrer">http://datatables.net/tn/3</a>"</em></p>
  
  <p>so i do another round of research on why i am having this problem.</p>
  
  <p>the problem is i am calling the dataTable() function twice on my page</p>
  
  <p>so the solution should be to only call it once.</p>
  
  <p>the second problem i have is i dont know where the first function has been called.</p>
  
  <p>Reason : i am making use of a template and it does not state explicitly where this is defined.</p>
  
  <p>how can i get rid of this error? is there any method.</p>
  
  <p>please see my implementation for disabling sorting below which works for sorting but triggers that error</p>
  
  <pre><code>   $(document).ready(function() {
        $('#datatable').dataTable({
            "bSort": false,
            "bDestroy": true
         });
      });
  </code></pre>
  
  <p>what i am trying to achieve is display my datatable without sorting</p>
  
  <p>Thanks</p>