# Change row color of table

**URL:** <https://forum.inductiveautomation.com/t/change-row-color-of-table/11346>\
**Category:** Ignition\
**Created:** [March 10, 2016, 11:24pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346 "2016-03-10T23:24:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [March 10, 2016, 11:24pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/1 "2016-03-10T23:24:36Z")

</div>

Is it possible to change color of row of a table depending on a column value?  
If so? can someone guide me how to do it?

Thank you.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [March 11, 2016, 2:29am UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/2 "2016-03-11T02:29:14Z")

</div>

Yes.

I like creating a custom property on the table of type Color. In this case, I named it “SomeColor”  
In the configureCell extension function of the table:

```auto
# I am checking to see if the Boolean Column is true
isChecked = self.data.getValueAt(rowIndex,"Boolean Column")
	if isChecked:
		return {'background':self.SomeColor}
```

---

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [March 14, 2016, 4:12pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/3 "2016-03-14T16:12:55Z")

</div>

Hi Jae,

Thank you for the response.  
By configureCell extension you mean "getBackgroundAt? "

Thanks!

---

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [March 14, 2016, 4:18pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/4 "2016-03-14T16:18:02Z")

</div>

this was the error i had after implementing what you suggested.

ERROR [Table-AWT-EventQueue-0] Enable to cast return value {‘background’: java.awt.Color[r=255,g=255,b=255]} to class java.awt.Color.  
java.lang.ClassCastException: Cannot coerce value ‘{‘background’: java.awt.Color[r=255,g=255,b=255]}’ into type: class java.awt.Color

---

<div class="post-metadata">

**Author:** ![the\_newb](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@the\_newb](https://forum.inductiveautomation.com/u/the_newb)\
**Post date:** [March 14, 2016, 7:13pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/5 "2016-03-14T19:13:15Z")

</div>

Double click on the table to open the table customizer, click on the tab at the top for ‘Background Color Mapping’, select the column you want to monitor in the dropdown list, set the color at the bottom for different values.

---

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [March 14, 2016, 10:03pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/6 "2016-03-14T22:03:13Z")

</div>

I did that, did not work.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [March 14, 2016, 10:40pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/7 "2016-03-14T22:40:49Z")

</div>

Are you using the regular table or power table?

---

<div class="post-metadata">

**Author:** ![ella\_ramos](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ella_ramos/32/3455_2.png) [@ella\_ramos](https://forum.inductiveautomation.com/u/ella_ramos)\
**Post date:** [March 15, 2016, 4:36pm UTC](https://forum.inductiveautomation.com/t/change-row-color-of-table/11346/8 "2016-03-15T16:36:01Z")

</div>

oh i was using the normal table, i switched to power. its working now. thanks!
