I am trying to implement a functionality to allow user to specify relevant columns to observe from a database. Each column should show only if a condition is met. To hide/show a column I used the suggested method of adding style="display:none" in the header-cell & row-cell. This approach worked for the row-cell directly, but for the header-cell I needed to add this style to the column text element as well or otherwise it did not hide the header at all. The problem now is that the sorting icon still remains and I can't figure out how to hide it so that the database remains properly aligned.
As you can see, the rows of the column "OMA_Created" are under this sorting arrow and the column itself is showing above the rows for the next column.
Hi @Evtim Kostadinov
I am able to reproduce your issue so Please check that you have applied Style = "display:none;" in Header Cell attribute not in text inside Header Cell.
Because if you applied CSS on text then it'll show error what you are facing-
And the correct place is -
I hope it'll solve your issue.
Thanks
Deep
Hi @Deepsagar Dubey,
Using "display:none;" style on the Header Cell does not make it disappear for some reason. Do you know what the reasons could be ?
Best,
Evtim
Even, you can use !important keyword for the inline CSS.
HI Evtim,
I could not reproduce your situation, using the same display:none; instruction on the table header.
Can you confirm, you are indeed applying it to the header cell and not to the container including the header label?
Cheers,João
Hi @João Marques,
I tried it in the Header Cell as well, but the sell doesn't disappear for some reason. Any tipps on why ?
@Evtim Kostadinov you are just hiding the header name, that is the reason you are able to still see the rest of the values, check the above comments, if you want to hide the column you should use the style for the header-cell and the data-content-cell i.e for that specific th and specific td.
I managed to solve my issue - I have added some text aligning style which for some reason stopped the initial style attribute to take action over the header cell. Once I removed it, everything worked as expected.