Remove / Hide child's inner datatable thead
Remove / Hide child's inner datatable thead
Red Sniper
Posts: 50Questions: 11Answers: 0
in DataTables
Hell there,
I have tried following this guide to set a datatable with editor as the content of a child row.
I don't want, though, the header of this table to be displayed, as it matches the one of the parent table.
This is causing a little issue because If I hide that header, editor won't work (I cannot edit the cells on focus anymore).
Is there a solution for this ?
Thanks in advance
Answers
Sorry Allan, I forgot the link of the guide
https://datatables.net/blog/2019/parent-child-editing-in-child-rows#Creating-a-DataTable
Hi,
Have you tried hiding the header of the child table using CSS? E.g.:
Allan
Hi Allan,
I already tried using css, and I managed to hide the thead.
Unfortunately, this causes other issues with alignment to the parent table (adjust() doesn't work in this case), probably because it is a table with ScrollY enabled (?).
If there is no another way, I will just keep it as it is.
Ah - I wasn't clear that you wanted the cells to align. For that you need to add the child rows as a
tr
. Seerow().child()
- you can pass atr
to be added as the child row.That isn't covered in the blog post originally linked to, but it might do what you need.
Allan