Power Table Column Width

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?

#old way
table.setColumnWidth(columnindex, size)

Also, is the power table in the manual anywhere?

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

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


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?


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.

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

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