# Hidding table columns with CSS selector

**URL:** <https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422>\
**Category:** Get Answers\
**Created:** [June 16, 2024, 6:51pm UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422 "2024-06-16T18:51:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Frank](https://forums.knack.com/u/Frank)\
**Post date:** [June 16, 2024, 6:51pm UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/1 "2024-06-16T18:51:48Z")

</div>

I am looking to show/hide columns with CSS via a field value of a seperate view on a single screen.

Reasoning: I have many users that need to view and hide columns of a large grid at different times of the day. It is an attendance application. I understand different views could be the answer but hiding/showing columns would be much cleaner for the end user.

My Success: I am able to inline edit a Yes/No on view one and hide a list field value on view 2 with CSS based on the value of Yes/No one view one.

My Failure: I am unable to find the CSS selector and code to hide/show columns. I have found interesting ideas but can not find the selector/path to address the column and show/hide the column.

Anyone have any suggestions or examples that can help or lead me in the right direction?

FS

---

<div class="post-metadata">

**Author:** ![Dean2](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@Dean2](https://forums.knack.com/u/Dean2)\
**Post date:** [June 16, 2024, 10:22pm UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/2 "2024-06-16T22:22:32Z")

</div>

Have you looked into using KTL’s \_hc Hide Column keyword?

Dean

---

<div class="post-metadata">

**Author:** ![CSWinnall](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/cswinnall/32/3631_2.png) [@CSWinnall](https://forums.knack.com/u/CSWinnall)\
**Post date:** [June 17, 2024, 6:28am UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/3 "2024-06-17T06:28:47Z")

</div>

Here is the link for hide Column:

> **[Keywords](https://github.com/cortexrd/Knack-Toolkit-Library/wiki/Keywords#_hccolheader1-colheader2)**
>
> Knack Toolkit Library. Contribute to cortexrd/Knack-Toolkit-Library development by creating an account on GitHub.

And for using a condition:

> **[Keywords](https://github.com/cortexrd/Knack-Toolkit-Library/wiki/Keywords#ktlcond)**
>
> Knack Toolkit Library. Contribute to cortexrd/Knack-Toolkit-Library development by creating an account on GitHub.

Here is the syntax for hiding columns based on another views field.

\_hc=[colHeader1, colHeader2], [ktlCond, is, 50, field\_123, view\_xyz]

Craig

---

<div class="post-metadata">

**Author:** ![CarlHolmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/carlholmes/32/2814_2.png) [@CarlHolmes](https://forums.knack.com/u/CarlHolmes)\
**Post date:** [June 17, 2024, 9:21am UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/4 "2024-06-17T09:21:55Z")

</div>

Hi @Frank - after having a brief email conversation with @CSWinnall this morning, I thought I’d follow up on his post and how this would actually look. Hopefully this will bring this to life for you and anyone else interested in exploring the amazing world of KTL

Cortex R&D Inc. - [YouTube channel](https://www.youtube.com/@cortexrdinc.4479/videos)  
[Configurator](https://ctrnd.s3.amazonaws.com/KTL_Configurator.html)  
[Keyword List](https://github.com/cortexrd/Knack-Toolkit-Library/wiki/Keywords#ktlcond)  
[My YouTube Channel](https://www.youtube.com/@chprojectsupport)

[![Carl Holmes - Jun 17, 2024 - Forum](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/0/08297966da7ec081387ab70a6a9451cb12824874.gif)](https://www.veed.io/view/f5c63d55-8ab9-4ef1-88eb-dcfedd831e11)

---

<div class="post-metadata">

**Author:** ![CSWinnall](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/cswinnall/32/3631_2.png) [@CSWinnall](https://forums.knack.com/u/CSWinnall)\
**Post date:** [June 17, 2024, 10:25am UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/5 "2024-06-17T10:25:17Z")

</div>

Thanks Carl

This video is great. Very clear and easy to follow.

Craig

---

<div class="post-metadata">

**Author:** ![NormandDefayette\_CortexRD](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/normanddefayette_cortexrd/32/855_2.png) [@NormandDefayette\_CortexRD](https://forums.knack.com/u/NormandDefayette_CortexRD)\
**Post date:** [June 17, 2024, 12:59pm UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/6 "2024-06-17T12:59:05Z")

</div>

@CarlHolmes,

Wow!! That’s a great video, Carl. A perfect example of how the KTL works. Thanks!

Norm  
KTL’s _Dad_

---

<div class="post-metadata">

**Author:** ![CarlHolmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/carlholmes/32/2814_2.png) [@CarlHolmes](https://forums.knack.com/u/CarlHolmes)\
**Post date:** [June 17, 2024, 1:11pm UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/7 "2024-06-17T13:11:24Z")

</div>

Thanks @NormandDefayette_CortexRD - also I appreciate you pointing out the below verbal typo 😉

_When you say: “…if condition is Ex Student, hide the field\_80 in view\_441”_  
_Actually it should be: “…if the value in field\_80 of view\_441 is Ex Student, hide column Update”_

---

<div class="post-metadata">

**Author:** ![Frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Frank](https://forums.knack.com/u/Frank)\
**Post date:** [June 18, 2024, 12:59am UTC](https://forums.knack.com/t/hidding-table-columns-with-css-selector/17422/8 "2024-06-18T00:59:30Z")

</div>

Thank you Carl and to all others that showed an interest in my post. Within the last few days I have crawled into the KTL rabbit hole and love it here. The video and other suggestions were awesome and save me valuable time in my project. I greatly appreciate the help!

Cheers
