DataTables solving cannot reinitialise DataTable problem

Source: Internet
Author: User

Reason: DataTables does not allow multiple initialization of a table
Workaround: Set destroy:true at initialization time.
But in a page of the modal box has more than one table, if the above solution, in the Closed modal box and then reopened, will be an error, and the number of tables are not fully displayed
Normal Condition:

Close and then click again to open:
Error message: Failed to execute ' insertbefore ' ' node ': the node before which the new node are to be inserted isn't ' a child of th Is node.


Solution: Use Retrieve:true instead of destroy:true.
Retrieve:true says I already know that initialization options cannot be changed after initialization, except that you want to return a DataTable instance.
The official website about cannot reinitialise DataTable error message solution: HTTPS://DATATABLES.NET/MANUAL/TECH-NOTES/3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.