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.
Take a look at this script. If you analyze it you should be able to see the places where your script went off track.
table = event.source.parent.getComponent('Table')
columnData = table.columnAttributesData
newData = system.dataset.setValue(columnData, 1, 'editable', 1)
table.columnAttributesData = newData
I also think it's important to read this:
That dataset only updates when you open the customizer. You could put a Cell Updated binding on it if you want to force some values in there, or bind the whole dataset to something else, but generally modifying the Cell Attributes dataset is a pain. It will remember rows you have already set up even if the column wasn’t there a few minutes ago.
1 Like