# \[BUG-13817\] style defined for columns not applied in perspective table

**URL:** <https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [August 11, 2019, 7:22pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344 "2019-08-11T19:22:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [August 11, 2019, 7:22pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/1 "2019-08-11T19:22:55Z")

</div>

The designer shows a `style` property for perspective table columns. Styles defined there are not applied to the cell.  
I know that a cell object with styles can be passed to the column and this works good, but for simple formattings it would be more straight forward to have the styles property applied to the column.  
Ignition Version 8.0.3

Edit:  
I’m talking about the style property in defined columns:

 ![columns_style](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3b14ca73a2e7348632b32038ecb67693cd2144f0.png)

---

<div class="post-metadata">

**Author:** ![mvanryn](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@mvanryn](https://forum.inductiveautomation.com/u/mvanryn)\
**Post date:** [August 12, 2019, 8:38pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/2 "2019-08-12T20:38:10Z")

</div>

I don’t see a `style` property for columns. There is a `style` property for `rows` and for `cells`. The latter does what I think you are describing.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [September 6, 2019, 2:40pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/3 "2019-09-06T14:40:17Z")

</div>

Hi,

Sorry for the delay. I don’t think it works the way you would expect. That style is actually applied to a column underlay that sits beneath the table body, so in order to see it take effect, you’d have to remove any styling or rows, if that makes sense. Despite all of that, you’re right, it doesn’t work because it’s getting overshadowed by an internal background color being set on the tables body. This is all set to change very soon, as we plan to provide you with the ability to style every piece of the table. I think adding a cells style object in the column config may be a good idea so that it can override the global cells style object that sits at the root of the table. I’ll include this in our existing ticket. In the meantime, if you want to apply styles to the cells of a column, you can try transforming your data so that each cell of that column is a custom object containing a style property. It’s a bit of a workaround, but should get you what you need for now.  
Assuming you are using a dataset, something like this might work.

```auto
	output_json = []
	    
	style_zeit_meld = {"backgroundColor": "#F7901D"}
	
	for row in range(value.getRowCount()):
		row_object = {}
		for col in range(value.getColumnCount()):
			if value.getColumnName(col) == 'zeit_meld':
				cell_object = {}
				cell_object['value'] = value.getValueAt(row, col)
				cell_object['style'] = zeit_meld_style
				row_object['city'] = cell_object
			else:
				row_object[value.getColumnName(col)] = value.getValueAt(row, col)
			
			output_json.append(row_object)
	        
	return output_json

```

-Y

---

<div class="post-metadata">

**Author:** ![indenkleefj](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/indenkleefj/32/10961_2.png) [@indenkleefj](https://forum.inductiveautomation.com/u/indenkleefj)\
**Post date:** [May 12, 2020, 9:42am UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/4 "2020-05-12T09:42:31Z")

</div>

What is the current status of this ticket?

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [May 12, 2020, 3:18pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/5 "2020-05-12T15:18:12Z")

</div>

Nothing has change, but I’ll do my best to move it forward. Hopefully soon.

---

<div class="post-metadata">

**Author:** ![jsalceda](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jsalceda](https://forum.inductiveautomation.com/u/jsalceda)\
**Post date:** [September 7, 2021, 12:18am UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/6 "2021-09-07T00:18:33Z")

</div>

I’m still experiencing this bug in Ignition 8.1.9, is this ticket still active?

---

<div class="post-metadata">

**Author:** ![tim.schultz](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tim.schultz](https://forum.inductiveautomation.com/u/tim.schultz)\
**Post date:** [November 22, 2021, 9:21pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/7 "2021-11-22T21:21:22Z")

</div>

Same thing here - is there a targeted release for this anytime soon? It is quite annoying.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 22, 2021, 9:29pm UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/8 "2021-11-22T21:29:42Z")

</div>

The table got a variety of new style props in 8.1.11:  
[https://docs.inductiveautomation.com/display/DOC81/New+in+this+Version#NewinthisVersion-Perspective.1](https://docs.inductiveautomation.com/display/DOC81/New+in+this+Version#NewinthisVersion-Perspective.1)

---

<div class="post-metadata">

**Author:** ![bao.nguyen](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bao.nguyen](https://forum.inductiveautomation.com/u/bao.nguyen)\
**Post date:** [February 2, 2022, 3:33am UTC](https://forum.inductiveautomation.com/t/bug-13817-style-defined-for-columns-not-applied-in-perspective-table/27344/9 "2022-02-02T03:33:18Z")

</div>

Thank you. Your solution works well for me.
