Using a datatables inside a child row
Using a datatables inside a child row
enboig
Posts: 5Questions: 2Answers: 1
I followed https://www.datatables.net/blog/2017-03-31 and I try to add a diferent datatable for each row.
I "appear" to work, but checking console I get
Uncaught TypeError: divHeader[0] is undefined
in firefox, and
Uncaught TypeError: Cannot read properties of undefined (reading 'style')
in chrome.
Do I have to have anything into account to use 2 (or more...) datatables in a single page?
This question has an accepted answers - jump to answer
Answers
I have just found https://datatables.net/blog/2019-01-11 which should help me make it working. I suppose something is not initialized as it should; each table used $(selector).ajax.reload() to refresh, but I had to change it to dtVariable.Datatable().ajax.reload() to keep it working
I found the problem, to remove "search box" I completely removed DOM, so there was no "divHeader" after all...