# Interactive tables - selected columns issue

**URL:** <https://community.plotly.com/t/interactive-tables-selected-columns-issue/84718>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [May 24, 2024, 3:45pm UTC](https://community.plotly.com/t/interactive-tables-selected-columns-issue/84718 "2024-05-24T15:45:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danforman980](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danforman980](https://community.plotly.com/u/danforman980)\
**Post date:** [May 24, 2024, 3:45pm UTC](https://community.plotly.com/t/interactive-tables-selected-columns-issue/84718/1 "2024-05-24T15:45:25Z")

</div>

I have been trying to create a very basic dash page that loads in data from an external database, peforms a search on that data and then puts the results in a table which can then be selected to output the selected rows as text at the bottom. e.g if i selected row a then clicked a button, “a” would show at the bottom of the page. When i try to use the selected\_columns array, however, i get this error: nonexistent object was used in an `State` of a Dash callback. The id of this object is `selected_columns` and the property is `value`. The string ids in the current layout are: [database, database\_select, targets, submit\_val, dataframe, load\_data, outtest]

Despite this i have defined it in the layout here.

```python
app = Dash( __name__ , suppress_callback_exceptions=True)

app.layout = html.Div([

        html.H3(id='database', children='Enter data and select database'),
    
        html.Div([
            
            html.Div(dcc.Dropdown(['PubMed', 'MGI'], 'PubMed', id='database_select')),

            html.Div(dcc.Input(id="targets", type="text", placeholder="")),

            html.Button('Submit', id='submit_val', n_clicks=0),
            
        ]),
    
        html.Div(dash_table.DataTable(id = 'dataframe', row_selectable="multi", selected_rows=[])),
    
        html.Div([
    
            html.Button('load data', id='load_data', n_clicks=0),

            html.P(id='outtest', children='')
        ])

    ])

```

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [May 27, 2024, 8:39pm UTC](https://community.plotly.com/t/interactive-tables-selected-columns-issue/84718/2 "2024-05-27T20:39:14Z")

</div>

Hey @danforman980 welcome to the forums.

The code snippet you provided does not throw any error. Please provide all necessary code to reproduce the issue.

Just a hint: I actually would always choose dash ag-grid over data-table for tabular data.
