How can I enable and disable Edits in a table

I would like to use a switch, with which I would like to make a table editable, which is normally not editable.
For this I have made a small JS query, whith the following code:

table1.disableEdits = !switch1.value;

While this code runs successfully, it doesn't actually have any effect. The table remains uneditable.

I fear that disableEdits is supposed to be a readonly attribute, and that it can only be changed in edit mode, but not dynamically.

Any advise is highly appreciated.

Hi there,

Thanks for reaching out to us. Would enabling the column dynamically in the column settings achieve the functionality you're looking for here?

1 Like

Same issue with me. I am using unprepared statements to create an app for a DBA. The new table does not support dynamic queries where the target table changes and the number of columns. I am using the legacy table and can get the columns of the table which returns an array of columns. Now I need the ability to make the columns of the legacy table editable pragmatically.