# Perspective Table selectedrow disable or change colour

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [April 19, 2022, 4:53am UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578 "2022-04-19T04:53:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sourabh\_Ambildhuke](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Sourabh\_Ambildhuke](https://forum.inductiveautomation.com/u/Sourabh_Ambildhuke)\
**Post date:** [April 19, 2022, 4:53am UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/1 "2022-04-19T04:53:51Z")

</div>

Hi Folks,

Basically typical application is when i click any row, i am sending that data to respective tags. but after the data is send i want to disable that row or not edit that row. so that the user wont be able to select that row again.  
i tried with selectedrow = None but it doesnt disable the row only deselect the row.

Thanks

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [April 19, 2022, 6:51am UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/2 "2022-04-19T06:51:42Z")

</div>

You can style a row by adding style/value keys before the data.  
You could add a background-color, or set the row a bit transparent with opacity, maybe change the `cursor:not-allowed` (for the cursor icon) and `pointer-events:none` (to prevent clicks)

You'll need some logic (session prop?) to keep track of what is selected i guess and do some script like this

> [@Perspective table cell color](https://forum.inductiveautomation.com/t/perspective-table-cell-color/50047):
>
> Hi All Using this link below I have been able to set the color of individual rows in a Perspective table based on the value of a cell. I would like to set the colors of individual cells. I can see that the script below is setting a style for the whole row. I have tried to loop through my dataset and assign a style to each cell without any luck. Please can someone point me in the right direction? Thanks! [[Feedback] NEW Perspective Table - Ignition Early Access - Inductive Automation Forum](https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199/47) outp…

---

<div class="post-metadata">

**Author:** ![Sourabh\_Ambildhuke](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Sourabh\_Ambildhuke](https://forum.inductiveautomation.com/u/Sourabh_Ambildhuke)\
**Post date:** [April 19, 2022, 4:42pm UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/3 "2022-04-19T16:42:08Z")

</div>

As you mentioned to add style in each row data. but it need to be dynamic and not the static one. So i first need to create style for each and then check row style and apply the background color.

As you shared the topic, but i tried that also on transform but this also doesnt work.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [April 19, 2022, 4:44pm UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/4 "2022-04-19T16:44:42Z")

</div>

Why not just remove the row from the table’s dataset?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [April 20, 2022, 6:19am UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/5 "2022-04-20T06:19:09Z")

</div>

The style is dynamic if you refresh the binding that provides this logic.  
Just be sure to not run any queries there, but do them elsewhere with their own refresh rate^^

---

<div class="post-metadata">

**Author:** ![Goran\_Enggrav\_Steen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/goran_enggrav_steen/32/43595_2.png) [@Goran\_Enggrav\_Steen](https://forum.inductiveautomation.com/u/Goran_Enggrav_Steen)\
**Post date:** [February 1, 2023, 2:33pm UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/6 "2023-02-01T14:33:02Z")

</div>

Does anyone know where I can find the documentation for witch property I can use with this way?

I had a similar issue and I set the style property for the cells to:

`style = {"backgroundColor": "gray", "cursor":"not-allowed", "pointer-events":"none"}`

This works but i can find the documentation for it.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 1, 2023, 3:46pm UTC](https://forum.inductiveautomation.com/t/perspective-table-selectedrow-disable-or-change-colour/58578/7 "2023-02-01T15:46:36Z")

</div>

You can use any style/css property.  
So thats so much its not gonna fit in a simple list 😛
