fnDestroy should remove elements if they were created by dataTables
fnDestroy should remove elements if they were created by dataTables
jcspray
Posts: 1Questions: 0Answers: 0
Hi,
I'm invoking dataTable with aaData and aoColumns arguments so that it populates for me (my initial markup is just [code][/code]). This works great, but when I use fnDestroy the created elements are left, so that in future calls to .dataTable I get strange errors if the columns are different (primarily if I have more columns than I used to).
It seems to me that if dataTables is able to create elements for me, it should also remove them when I call fnDestroy -- I currently just do a .html("") on my to work around it, but it would be nice if I this was all encapsulated in dataTables.
Thanks for the useful code.
I'm invoking dataTable with aaData and aoColumns arguments so that it populates for me (my initial markup is just [code][/code]). This works great, but when I use fnDestroy the created elements are left, so that in future calls to .dataTable I get strange errors if the columns are different (primarily if I have more columns than I used to).
It seems to me that if dataTables is able to create elements for me, it should also remove them when I call fnDestroy -- I currently just do a .html("") on my to work around it, but it would be nice if I this was all encapsulated in dataTables.
Thanks for the useful code.
This discussion has been closed.