Datatable not working in popup

Datatable not working in popup

MurrayMurray Posts: 22Questions: 8Answers: 0

I have a data table that works perfectly on a normal screen however gives the DataTables warning: table id={id} - Cannot reinitialise DataTable when in a popup. Adding the retrieve: true removes the error but does not display the table. Where am I going wrong?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 22,405Questions: 26Answers: 5,147
    Answer ✓

    It's difficult to say what the problem might be without seeing the issue. I would start by looking for errors in the browser's console. Sounds like you are trying to initialize the Datatable when opening the popup. Possibly you should only init the Datable on page load. But again without seeing the issue it's hard to guess.

    Please post a link to your page or a test case replicating the issue so we can follow your code flow to help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • MurrayMurray Posts: 22Questions: 8Answers: 0

    Thank you for prompt response. It was my mistake as there was another section on the page that was initialising the same datatable. Now fixed.

Sign In or Register to comment.