Datatable editable for only 1 column

You can set the editable property at either (or both) the table level or the column level. The column level overrides the table level. So you can set edtiable =False for the table - or take it out since False is the default.

Try this:

return dash_table.DataTable(
                    id=table_id,
                    sort_action='native',
                    editable=False,
                    columns=[{"name": i, "id": i} if i != editable_col else {"name": i, "id": i, "editable": True} for i in df.columns],
                    data=df.to_dict('records'),
                    style_table={'width':'98%'})```
1 Like