How to make columns editable programmatically

I pull data from the database where the columns are dynamic and will be added over time (or can be any arbitrary projection). I want to make them editable as they are added to the table. I didn’t see any way to do it programmatically without using the UI which will not work as columns are dynamic.

Hello! Unfortunately, today it is not possible to control the Editable property of the Table widget through code. You would have to turn on this property in the property pane if you wish to edit data on the table inline.
Could you please help us file a feature request using the following link?- Sign in to GitHub · GitHub
Please include your use case and how it will be useful for you.

The use case is simple: I have columns with dates that have an associated value for each row. I want to be able to click on that value (e.g. cell → row:column) and edit it. After editing the cell I execute a function that updates my database with the new value for this cell. The date columns are populated dynamically based on some algorithm.

I tried to prepopulate the columns (not ideal), but apparently I can’t make them editable either: Not able to make custom column editable

To make this work I just need to be able to attach my function that will do the work of saving the data to onSubmit event programmatically and that onSubmit event should tell me the row and the column that that fired the event so that I can retrieve the updated value and persist it.

At the bottom of the Data section in the table properties there should be a master checkbox directly above the list of columns that makes all of them editable. Have you tried enabling it to see if it works for dynamic columns?

Unfortunately, it will only make editable the columns that are already known to the system. The new columns if they show up are not editable. Also, I’d need to somehow connect onSubmit for each one to my function that does the work.

Also, I only want to make some columns editable, not all (only those with dates, e.g. looking at the format of the column name).

In this case, there is no workaround. Please consider creating a new feature request and include the details on your use case.

I have the same problem right now. Why can’t I just make the whole table editable? What is the point of creating the columns dynamically if I can only display the values but not edit them?