# Table Row Background color, from scripting event. It's broken

**URL:** <https://forum.inductiveautomation.com/t/table-row-background-color-from-scripting-event-its-broken/100268>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 27, 2024, 4:51pm UTC](https://forum.inductiveautomation.com/t/table-row-background-color-from-scripting-event-its-broken/100268 "2024-12-27T16:51:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [January 2, 2025, 5:50pm UTC](https://forum.inductiveautomation.com/t/table-row-background-color-from-scripting-event-its-broken/100268/3 "2025-01-02T17:50:37Z")

</div>

Aha, I knew you were on the forums somewhere! Really like the work.  
Colors - when I click Add I see a flash of orange, then all goes back to default colors.  
Row are added and deleted as expected.

  
This vid shows the add feature, but with new data.

After clicking Delete:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/0168d91e1d551e50185ed0fa9ff7d1ebdd139fd5.png)

> [@danieltalbot](#):
>
> column's style.background-color property is updating

Ok, column style is not updating.

This is the Delete code:

```python
table = self.getSibling("Table_0")
	columns = table.props.columns
	selectedRow = table.props.selection.selectedRow
	data = table.props.data
	
	if selectedRow is None:
		pass
	elif data[selectedRow]['ReqID']['value'] is None:
		del table.props.data[selectedRow]
	else:
		table.props.data[selectedRow]['deleteMe'] = True
		
		for col in columns:
			colName = col.field
			table.props.data[selectedRow][colName]["style"]["background-color"] = "var(--error)"

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/table-row-background-color-from-scripting-event-its-broken/100268)._
