Update TypeError: Cannot set property '_aData' of undefined ( + jsfiddle)
Update TypeError: Cannot set property '_aData' of undefined ( + jsfiddle)
Gfn25
Posts: 2Questions: 0Answers: 0
Hi everyone!
I've just started using the DataTables 1.9.4, and found this issue on a (possibly) simple thing for you.
If you run this code on this page, http://jsfiddle.net/HEDvf/524/ , you will get the error shown on the subject of this page. Note that I've loaded all files needed for displaying the table along with bootstrap (as in the website example).
The init code is at the javascript frame.
Here are my questions:
1. I want to update the entire datatable, (var dtable), whith a new array of data. Why isn't this code working?
2. Since I want to replace the entire table multiple times, should I better use 'fnDestroy' so as to clear memory? Otherwise, will fnUpdate NOT leak any memory of not-needed data?
Thank you in advance! :)
I've just started using the DataTables 1.9.4, and found this issue on a (possibly) simple thing for you.
If you run this code on this page, http://jsfiddle.net/HEDvf/524/ , you will get the error shown on the subject of this page. Note that I've loaded all files needed for displaying the table along with bootstrap (as in the website example).
The init code is at the javascript frame.
Here are my questions:
1. I want to update the entire datatable, (var dtable), whith a new array of data. Why isn't this code working?
2. Since I want to replace the entire table multiple times, should I better use 'fnDestroy' so as to clear memory? Otherwise, will fnUpdate NOT leak any memory of not-needed data?
Thank you in advance! :)
This discussion has been closed.
Replies
Allan
Now I've set it to fnClearTable, fnDestroy, and then enable dataTables.
There seems to be a memory leak when you place the "destroy" parameter only, the profiler shows memory consumption keeps increasing, and thus you have to do the above steps in sequence to free all un-needed memory data.
You might as well see this yourself if you want. :)
Thanks