Open mc-its-sorted opened 8 months ago
@mc-its-sorted It looks like the correct implementation is:
# Remove the groupIncludeFooter parameter from the configure_column method
gb.configure_column(field='profit', sort='asc', aggFunc='sum')
# Instead use the configure_grid_options method to include the groupIncludeFooter AND the groupIncludeTotalFooter parameters.
gb.configure_grid_options(groupIncludeFooter=True, groupIncludeTotalFooter=True)
Ag-grid 31.3.0 changed how total rows are handled here: https://ag-grid.com/archive/31.3.0/javascript-data-grid/grouping-footers/
likely the new way to do this is:
gb.configure_grid_options(groupTotalRow='bottom', grandTotalRow ='bottom')
Thanks Steve
Hello,
I'm able to get groupTotalRow
and grandTotalRow
showing as you described @lomnes-atlast-food, thank you! However, enabling these options now means that any edited cells are not tracked in my streamlit app:
gb = GridOptionsBuilder.from_dataframe(df)
gb.configure_grid_options( ..., groupTotalRow='bottom', grandTotalRow='bottom',...)
gridOptions = gb.build()
# Display the grid
grid_response = AgGrid(
df,
gridOptions=gridOptions,
allow_unsafe_jscode=True,
data_return_mode=DataReturnMode.AS_INPUT,
update_mode=GridUpdateMode.VALUE_CHANGED,
)
start streamlit app
grid_response.event_data is None # returns True
edit cell value
grid_response.event_data is None # returns True
This only happens when I enable groupTotalRow
and grandTotalRow
, otherwise cells edits are tracked in grid_response.event_data
as type:cellValueChanged
- anyone know what I might be missing?
Thanks, Matt
hi
Awesome to use this in streamlit
I'm trying to get grand totals at the bottom of columns.
I'm trying this:
alas not working ... is this supported ?
Any help appreciated Thanks Mark