# Power Table

**URL:** <https://forum.inductiveautomation.com/t/power-table/8940>\
**Category:** Ignition\
**Created:** [August 21, 2014, 3:06pm UTC](https://forum.inductiveautomation.com/t/power-table/8940 "2014-08-21T15:06:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [August 21, 2014, 3:06pm UTC](https://forum.inductiveautomation.com/t/power-table/8940/1 "2014-08-21T15:06:17Z")

</div>

I’ve struggled a bit trying to get a particular column (index 0) to center from script. Here’s my code:

```auto
from javax.swing import SwingConstants
	
ds = self.columnAttributesData
for i in range(ds.rowCount) :						
	ds = system.dataset.setValue(ds,i,"horizontalAlignment",SwingConstants.CENTER)
self.columnAttributesData = ds
```

This seems to work for all columns except 0. I’ve worked around it by reordering some of my columns and making the one that ends up as col. 0 in that data set as a hidden one.

Another thing I’d like to be able to do is populate the table with lots of columns but initially hide them then let the user selectively show them using the pop up menus for column filtering. However, when I set columns to hidden they do not show up in the pop up menus. Is there a way to do this?

Also: When does the columnAttributesData dataset get populated. It seems I had to use the table customizer before it was populated? Is there a way to do this in script?

Kurt

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [August 29, 2014, 9:19pm UTC](https://forum.inductiveautomation.com/t/power-table/8940/2 "2014-08-29T21:19:56Z")

</div>

bump

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [September 2, 2014, 12:42pm UTC](https://forum.inductiveautomation.com/t/power-table/8940/3 "2014-09-02T12:42:30Z")

</div>

You could try just setting it to the value (zero). When I set the Table Customizer and look at the attributes table, the value is zero:

```auto
   ds = system.dataset.setValue(ds,i,"horizontalAlignment","0")
```
