# Power Table Column Width

**URL:** <https://forum.inductiveautomation.com/t/power-table-column-width/9862>\
**Category:** Ignition\
**Created:** [March 31, 2015, 3:03pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862 "2015-03-31T15:03:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [March 31, 2015, 3:03pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862/1 "2015-03-31T15:03:53Z")

</div>

Can someone tell me how to change power table column widths?

With the old tables I could loop through the table and set the column widths based on some other property, however I don’t see the setColumnWidth() method anywhere?

```auto
#old way
table.setColumnWidth(columnindex, size)

```

Also, is the power table in the manual anywhere?

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [March 31, 2015, 5:33pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862/2 "2015-03-31T17:33:51Z")

</div>

You should be able to set the column widths with the exact same function. Here's the listing for the component in the user manual:

[support.inductiveautomation.com ... dtable.htm](https://support.inductiveautomation.com/usermanuals/ignition/index.html?tables_visionadvancedtable.htm)

---

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [March 31, 2015, 5:59pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862/3 "2015-03-31T17:59:43Z")

</div>

I get the error below when I try and implement it. I don’t see that method in the object dir either.

Here’s my code

```auto

tbl = event.source.parent.getComponent('tblProd')
tbl.setColumnWidth(0, 15)

```

Do I need to do it within the object itself, in one of the custom methods?

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e45def8639f2937403c89d2cf0fc12fe4286ab25.PNG)

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [April 1, 2015, 4:43pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862/4 "2015-04-01T16:43:34Z")

</div>

Where are you trying to set the column width from? The script you have works fine from a button, but I don’t think its referencing the component properly from wherever the script is.

---

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [April 1, 2015, 6:30pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862/5 "2015-04-01T18:30:37Z")

</div>

Thanks, I got an email from support saying that the setColumnWidth method wasn’t added until 7.7.4.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [April 2, 2015, 11:49pm UTC](https://forum.inductiveautomation.com/t/power-table-column-width/9862/6 "2015-04-02T23:49:01Z")

</div>

Strange, I tested the function in 7.7.3 and it worked.
