Complex table headers vs Column visibility vs Responsive

Complex table headers vs Column visibility vs Responsive

DanielADDanielAD Posts: 3Questions: 1Answers: 0

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

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    Before I dig into it in details, I'm getting an error when loading the example.

    DataTables warning: table id=example - Requested unknown parameter '6' for row 0, column 6. For more information about this error, please see https://datatables.net/tn/4

    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

  • DanielADDanielAD Posts: 3Questions: 1Answers: 0

    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.

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Answer ✓

    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

  • DanielADDanielAD Posts: 3Questions: 1Answers: 0

    Thanks a lot Allan!
    :)

Sign In or Register to comment.