# Is it possible to deselect a column in a Perspective Table using script?

**URL:** <https://forum.inductiveautomation.com/t/is-it-possible-to-deselect-a-column-in-a-perspective-table-using-script/52787>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 5, 2021, 5:53pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-deselect-a-column-in-a-perspective-table-using-script/52787 "2021-11-05T17:53:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 5, 2021, 5:53pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-deselect-a-column-in-a-perspective-table-using-script/52787/1 "2021-11-05T17:53:27Z")

</div>

Hello all,

I have a Table component that I am using to display SQL data. I plan to use column selection to aid me in manipulating the data. The problem that I am having is that I do not want my users to be able to select the first column. I have tried to find a selection element in the column properties but there is none. I have also tried to use an onClick event on table to detect the selectedColumn and deselect it if it is the column in question. But I am receiving and error when I do that.  
This are the different things that I have tried:

> event.selectedColumn = None  
> event.selectedColumn = "None"  
> event.selectedColumn = -1

This is the error that I am receiving:

> AttributeError: 'com.inductiveautomation.ignition.common.script.ada' object has no attribute 'selectedColumn'

---

<div class="post-metadata">

**Author:** ![chandler](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@chandler](https://forum.inductiveautomation.com/u/chandler)\
**Post date:** [November 5, 2021, 6:58pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-deselect-a-column-in-a-perspective-table-using-script/52787/2 "2021-11-05T18:58:06Z")

</div>

I would try the `onRowClick` event and then do something like this:

```auto
if self.props.selection.selectedColumn == 'the column name':
          self.props.selection.selectedColumn = -1

```

you were on the right track to set the `selectedColumn` to -1, but you need to set the property of the table to -1 to clear the selection.

edit:  
I misread your question, and edited to use the selected column instead of the selected row.
