Dash Ag Grid open source

Hi @Neil_H

You can find an example of updating columns in a callback here:

If you want to update the rows based on external filters such as dropdowns, you can sort or filter the data in a callback and return it to the grid’s rowData prop


Thank you guys, this is helpful, will update on progress in a little while.

Just to loop back, incase anyone else is wondering the same thing (updating ag grid data rows based on one or multiple dropdowns or other inputs; for changing columns, refer to to AnnMarieW’s link above).

    Output('aggrid', 'rowData'),
    Input(component_id = 'dropdown1', component_property = 'value'),
    Input(component_id = 'dropdown2', component_property = 'value'))

def select_grid_data(dropdown1_value, dropdown2_value):
    if dropdown1_value == "process 1":
        if dropdown2_value == 'date 1':
            return process1_date1_data
        if dropdown2_value == 'date 2':
            return process1_date2_data
    elif dropdown1_value == "process 2":
        if dropdown2_value == 'date 1':
            return process2_date1_data
        if dropdown2_value == 'date 2':
            return process2_date2_data

Note: this is a quick / dirty way on how I’m updating the rowdata prop for ag grid for testing - I realize nested IF statements is not ideal, I plan to use the input values to filter a dataframe or another more cleaner method.

1 Like

A post was split to a new topic: Ag Grid with Multi page apps