266
Views
7
Comments
Solved
Sorting arrows icon does not disappear when trying to hide a column from database.

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. 

2024-09-12 02-43-38
Deepsagar Dubey
Solution

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

UserImage.jpg
Evtim Kostadinov

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

2024-09-12 02-43-38
Deepsagar Dubey

Hi @Evtim Kostadinov 

Even, you can use !important keyword for the inline CSS.

2018-10-29 08-31-03
João Marques
 
MVP

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

UserImage.jpg
Evtim Kostadinov

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 ?


Best,

Evtim

2024-09-12 02-43-38
Deepsagar Dubey
Solution

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

UserImage.jpg
Evtim Kostadinov

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

2024-09-12 02-43-38
Deepsagar Dubey

Hi @Evtim Kostadinov 

Even, you can use !important keyword for the inline CSS.

2022-09-05 08-23-51
Naveen N

@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.

UserImage.jpg
Evtim Kostadinov

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.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.