# 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:** 1\
**Showing post:** 3

<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…

---

_[View the full topic](https://forum.inductiveautomation.com/t/table-row-remains-highlighted-even-after-setting-selectedrow-1/110515)._
