Complex table headers vs Column visibility vs Responsive
Complex table headers vs Column visibility vs Responsive
Link to test case: https://live.datatables.net/cuniyofe/2/
Debugger code (debug.datatables.net): utedud
Error messages shown: none
Description of problem: I have used “complex table headers” but have problems displaying content in responsive mode child rows. Instead of the column title, the input element from “table thead” element is displayed in the details view. Also, in the "Column visibility" dropdown menu, titles are not rendered they vanished after I added second “thead tr”.
I would appreciate any help.
Thanks.
This question has an accepted answers - jump to answer
Answers
Before I dig into it in details, I'm getting an error when loading the example.
That is indeed correct - the first row in the table header, and all the table body rows have six cells. The second row in the table header has seven cells.
I'm not sure what the correct intent is here? Six columns, or seven?
Allan
Thanks for noticing me Allan. It was my bad, I just added 7th cell to existing table. Now it is replaced with table from my project. It should be 7 cells.
Ah! I'm with you now and see the problem in https://live.datatables.net/cuniyofe/4/edit . Thanks for updating it and the clarification.
Add
orderCellsTop: true
to tell DataTables to use the top row in the header as the column titles. https://live.datatables.net/cuniyofe/5/edit .Allan
Thanks a lot Allan!