# Vision Power Table call configureHeaderStyle dynamically

**URL:** <https://forum.inductiveautomation.com/t/vision-power-table-call-configureheaderstyle-dynamically/40695>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 16, 2020, 4:14pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-call-configureheaderstyle-dynamically/40695 "2020-11-16T16:14:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 16, 2020, 4:27pm UTC](https://forum.inductiveautomation.com/t/vision-power-table-call-configureheaderstyle-dynamically/40695/2 "2020-11-16T16:27:12Z")

</div>

You can't do this directly using the `configureHeaderStyle()`. Unfortunately, to make it fully dynamic you'll have to suddenly jump a few layers down in Java Swing.

What you can do from `configureHeaderStyle` is limited - but there are still other options. What you'll have to do is create your own header renderer and set it to be used for the columns of your dataset - likely, each time your dataset changes. There's an example of this technique here:

> [@Table headers not centered](http://forum.inductiveautomation.com/t/table-headers-not-centered/19969/5):
>
> You’ll probably want this to fire automatically - probably on propertyChange of the data attribute, but this should get you started. table.getColumnModel().getColumn(1) sets the index of the column to modify (from 0, counting from left to right). from javax.swing.table import TableCellRenderer table = event.source.parent.getComponent('Table').getTable() class NonSortableHeaderRenderer(TableCellRenderer): def getTableCellRendererComponent(self, table, value, selected, focused, row, col): re…

You can make that a lot more efficient by caching the custom editor as a local (Swing, not Ignition) client property (see this thread: [Designer Color Chooser vs Runtime Color Chooser - #4 by PGriffith](http://forum.inductiveautomation.com/t/designer-color-chooser-vs-runtime-color-chooser/32505/4) for more info on that), and simply setting it as the editor for all the appropriate columns on data change.

---

_[View the full topic](https://forum.inductiveautomation.com/t/vision-power-table-call-configureheaderstyle-dynamically/40695)._
