Hi everyone,
When I select a row in AgGrid it forces the entire table to be re-run. This is due to: update_mode=GridUpdateMode.SELECTION_CHANGED. I can resolve this with update_mode=GridUpdateMode.VALUE_CHANGED, but then no data is being recorded for the selected row and I cannot pass it to the next function im my app. Is there any way to resolve this withiut having to reload the entire table each time I select a row? Thanks for help and fresh ideas!
I am using this funciton to call AgGrid in my app:
def AgGrid_with_display_rules(df):
gd = GridOptionsBuilder.from_dataframe(df)
gd.configure_pagination(enabled=True)
gd.configure_default_column(editable=False, groupable=True)
gd.configure_selection(selection_mode='multiple', use_checkbox=True)
gridoptions = gd.build()
grid_table = AgGrid(df, gridOptions=gridoptions,
update_mode=GridUpdateMode.SELECTION_CHANGED,
height=400,
allow_unsafe_jscode=True
)
sel_row = grid_table["selected_rows"]
st.write(sel_row)
return grid_table, sel_row