# Table row remains highlighted even after setting selectedRow = -1

**URL:** <https://forum.inductiveautomation.com/t/table-row-remains-highlighted-even-after-setting-selectedrow-1/110515>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 10, 2025, 2:52pm UTC](https://forum.inductiveautomation.com/t/table-row-remains-highlighted-even-after-setting-selectedrow-1/110515 "2025-09-10T14:52:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechEnlive](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@TechEnlive](https://forum.inductiveautomation.com/u/TechEnlive)\
**Post date:** [September 10, 2025, 2:52pm UTC](https://forum.inductiveautomation.com/t/table-row-remains-highlighted-even-after-setting-selectedrow-1/110515/1 "2025-09-10T14:52:12Z")

</div>

Hi everyone,

I have a Table component in Ignition Perspective. On a button click, I try to clear the table selection by setting:

```python
self.getSibling("Table").props.selection.selectedRow = -1

```

However, even though the property updates, the previously selected row **still appears highlighted** in the UI.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b7c8ad2d54eeb5f5867a5c90e38725d70c0a6106.png)

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [September 10, 2025, 2:55pm UTC](https://forum.inductiveautomation.com/t/table-row-remains-highlighted-even-after-setting-selectedrow-1/110515/2 "2025-09-10T14:55:41Z")

</div>

I believe you need to also set `enableRowSelection` to false. Then add a change script that detects that and sets it back to true.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 10, 2025, 2:55pm UTC](https://forum.inductiveautomation.com/t/table-row-remains-highlighted-even-after-setting-selectedrow-1/110515/3 "2025-09-10T14:55:42Z")

</div>

Don't assign to `.selectedRow`.

> [@Row selected problem in Perspective table](https://forum.inductiveautomation.com/t/row-selected-problem-in-perspective-table/100580/2):
>
> The trick is to set enableRowSelection to False, and have a change script on selectedRow looking for None, and then changing enableRowSelection back to True. The code must not set enableRowSelection to False when selectedRow is already None. Basically, row selection can only be performed reliably by the client browser. When you disable row selection, that state gets sent to the browser, and it clears the selection. When you see that change back in the gateway, you can re-enable row selection…
