Programmatically hide or show vision table column

I can’t find a way to programmatically hide or show a given column in a Vision table. Am I missing something or is it simply not possible?

(setting width to 0 is a kludgy workaround)

http://forum.inductiveautomation.com/t/dynamically-show-hide-column-in-powertable/22801

For the standard table component, the easest way I have found is to store the complete dataset in a custom property, I usually call this rawData or something similar. Then when whatever event occurs that you want to add or remove column/s build a new dataset using system.dataset.filterColumns to return a dataset with only the columns you want.

It’s possible but has some caveats with it.

This post shows how to get the columnsAttributeData and sets a column to be editable during runtime. You can probably achieve what you want manipulating the hidden attribute.

I also think it’s important to read this:

1 Like