# Power Table Customisation

**URL:** <https://forum.inductiveautomation.com/t/power-table-customisation/101408>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 27, 2025, 9:57am UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408 "2025-01-27T09:57:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soham\_Ambekar1](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@Soham\_Ambekar1](https://forum.inductiveautomation.com/u/Soham_Ambekar1)\
**Post date:** [January 27, 2025, 9:57am UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408/1 "2025-01-27T09:57:14Z")

</div>

I have used a power table and want to highlight the outer border when selected. So on the power table, I have done the scripting. When any cell is selected I want the whole row displayed with the orange border and its thickness should be 3 px. In the configure cell I have written the below script

```python
if selected == True:
		from java.awt import Font 
		from javax.swing import SwingConstants 
		from javax.swing.border import LineBorder 
		return {'background': '#281C08','foreground': '#FF8C35', 'text':value, 'toolTipText':value, 'border': LineBorder(system.gui.color(241, 122, 44), 3)}
	elif self.data.getValueAt(rowIndex,"CRANE SEQ STATUS") == 'COMPLETED':
		return {'background': '#474747','foreground': '#8C918E', 'text':value, 'toolTipText':value}
	elif self.data.getValueAt(rowIndex,"CRANE SEQ STATUS") == 'IN PROGRESS':
		return {'background': '#281C08','foreground': '#FF8C35', 'text':value, 'toolTipText':value}

```

But all the cell's border gets this code I want only the outside border of the row to be in the orange color.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/b/cbe42887463ae66ecd66bc27195efd69cf8a051c.png)

Any suggestion guys?

---

<div class="post-metadata">

**Author:** ![danielps1818](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@danielps1818](https://forum.inductiveautomation.com/u/danielps1818)\
**Post date:** [January 27, 2025, 10:16am UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408/2 "2025-01-27T10:16:35Z")

</div>

You should write border as a **BorderFactory**. Then you are able to modify specific borders.

Here is an example I found:

> [@Vision Power Table - Add columns border with configureEditor()](https://forum.inductiveautomation.com/t/vision-power-table-add-columns-border-with-configureeditor/67607/3):
>
> I found a few moments this morning to adapt the above suggestion into my test table. arrow_forward Here is the sample code: Here is the result:

Hope this helps

---

<div class="post-metadata">

**Author:** ![Soham\_Ambekar1](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@Soham\_Ambekar1](https://forum.inductiveautomation.com/u/Soham_Ambekar1)\
**Post date:** [January 27, 2025, 10:46am UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408/3 "2025-01-27T10:46:00Z")

</div>

I have gone through this solution but border is applied to the particular cell and not the whole row. I wanted if I select a particular cell then whole row should be selected.

---

<div class="post-metadata">

**Author:** ![danielps1818](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@danielps1818](https://forum.inductiveautomation.com/u/danielps1818)\
**Post date:** [January 27, 2025, 11:32am UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408/4 "2025-01-27T11:32:11Z")

</div>

What about aplying it to the whole row? even if you only select one particucalr cell?

---

<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:** [January 27, 2025, 12:20pm UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408/5 "2025-01-27T12:20:15Z")

</div>

IIRC, the row doesn't exist as a distinct Swing object that can be styled.

---

<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:** [January 27, 2025, 2:04pm UTC](https://forum.inductiveautomation.com/t/power-table-customisation/101408/6 "2025-01-27T14:04:32Z")

</div>

You'll have to apply a selective border. If the column index is 0 or equal to the column count, then apply the appropriate edge border (left or right). Other wise, always apply just a Top and Bottom border.
