Cannot reinitialise DataTable

Cannot reinitialise DataTable

cfh463cfh463 Posts: 3Questions: 0Answers: 0
edited November 2012 in General
I get the following Error when I click the back button to get back to a page that is using the DataTable:

"DataTables warning (table id ='matrix'): Cannot reinitialise DataTable

1) Using Chrome, go to http://edgedocs.rhomobile.com/rhoelements/apicompatibility
2) Click on one of the links in the rows of the table
3) Click the Back button on the browser

Notice that you get the error.

If you click Refresh on the brpowser the page reloads. I am not sure what is causing this or if i can work around it somehow.

Thanks in Advance.

Replies

  • cfh463cfh463 Posts: 3Questions: 0Answers: 0
    Update. After adding bRetrieve = true and bDestroy=true there is no error. But the table does not initilaze after coming to the page from the browser back button. The table is just a plain HTML table, so I am not sure why it is not able to reinit

    $(document).ready(function() {
    $("#matrix").dataTable({
    "bPaginate": false,
    "bLengthChange": false,
    "bFilter": true,
    "bSort": true,
    "bInfo": false,
    "bRetrieve": true,
    "bProcessing": true,
    "bDestroy": true,
    "bStateSave": true,
    "bAutoWidth": false});
  • cfh463cfh463 Posts: 3Questions: 0Answers: 0
    Update #2 - It turns out the problem is that the PJAX library (http://yuilibrary.com/yui/docs/pjax/) we were using to load page content was not making datatables very happy. So for now, I am just disabling pJAX on the pages that I want to use a data table.
This discussion has been closed.