# Column Hiding

**URL:** <https://forum.inductiveautomation.com/t/column-hiding/6378>\
**Category:** Ignition\
**Created:** [May 3, 2013, 2:40pm UTC](https://forum.inductiveautomation.com/t/column-hiding/6378 "2013-05-03T14:40:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![billymac00](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@billymac00](https://forum.inductiveautomation.com/u/billymac00)\
**Post date:** [May 3, 2013, 2:40pm UTC](https://forum.inductiveautomation.com/t/column-hiding/6378/1 "2013-05-03T14:40:51Z")

</div>

(newbie)I really could use a basic example, wasted too much time on this

I merely want a table column’s visibility to be driven from say a checkbox or a button event.  
I thought maybe I could use something like:  
[color=#004040]table=event.source.parent.getComponent(“Table”)  
system.dataset.setValue(table.columnAttributesData,1,3,0)[/color]

Maybe it’s working but I’ve called out incorrect column?

What is easy way to confirm which column is visibility/hide ?

Thanks! Would love to end week having solved this

---

<div class="post-metadata">

**Author:** ![CPowell](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CPowell](https://forum.inductiveautomation.com/u/CPowell)\
**Post date:** [May 3, 2013, 4:11pm UTC](https://forum.inductiveautomation.com/t/column-hiding/6378/2 "2013-05-03T16:11:21Z")

</div>

You were close. Just need to write the data back to the table.  
Also, you want column 2 not 3 if you want to the hide attribute.

```auto
table=event.source.parent.getComponent('Table')
if event.source.selected : #This is the check box I created.
	newData = system.dataset.setValue(table.columnAttributesData,1,2,1)
	table.columnAttributesData = newData
else:
	newData = system.dataset.setValue(table.columnAttributesData,1,2,0)
	table.columnAttributesData = newData
```

or you could lose the if statement since it is a check box.

```auto
table=event.source.parent.getComponent('Table')
newData = system.dataset.setValue(table.columnAttributesData,1,2,event.source.selected)
table.columnAttributesData = newData
```

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![billymac00](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@billymac00](https://forum.inductiveautomation.com/u/billymac00)\
**Post date:** [May 3, 2013, 7:04pm UTC](https://forum.inductiveautomation.com/t/column-hiding/6378/3 "2013-05-03T19:04:39Z")

</div>

That’s it, I VERY much appreciate it
