Strange issue with datatables wrapper
Strange issue with datatables wrapper
bbarani
Posts: 32Questions: 0Answers: 0
Hi,
I am using datatables for displaying the data in multiple tabs. I generate the data table id dynamically based on tab id.
For ex: for tabstrip id: tabstrip1, I would have data table id as tabstrip1Table and I populate the data table using Javascript array.
var oTable = $("#" + elementId).dataTable(); // I pass tabstrip1Table as element id here.
Everything seemed to work initially but sometimes when multiple tabs are opened datatables is acting very wierd..
If you see the below DOM, you can see that the wrapper of table 3 ( that should have been created under tabstrip-3) is created under tabstrip-2 and tabstrip-3 doesn't have wrapper at all.
Before I opened tab3, tab2 had its own wrapper tabstrip-2table_wrapper but when I opened tab3 the wrapper got replaced with the new wrapper.
[code]
[/code]
I tried using bdestroy and bretrieve but it doesnt seem to have any impact.. Can someone please let me know how to resolve this issue?
Thanks,
Barani
I am using datatables for displaying the data in multiple tabs. I generate the data table id dynamically based on tab id.
For ex: for tabstrip id: tabstrip1, I would have data table id as tabstrip1Table and I populate the data table using Javascript array.
var oTable = $("#" + elementId).dataTable(); // I pass tabstrip1Table as element id here.
Everything seemed to work initially but sometimes when multiple tabs are opened datatables is acting very wierd..
If you see the below DOM, you can see that the wrapper of table 3 ( that should have been created under tabstrip-3) is created under tabstrip-2 and tabstrip-3 doesn't have wrapper at all.
Before I opened tab3, tab2 had its own wrapper tabstrip-2table_wrapper but when I opened tab3 the wrapper got replaced with the new wrapper.
[code]
[/code]
I tried using bdestroy and bretrieve but it doesnt seem to have any impact.. Can someone please let me know how to resolve this issue?
Thanks,
Barani
This discussion has been closed.