GithubHelp home page GithubHelp logo

Comments (4)

lennondata avatar lennondata commented on June 12, 2024 1

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

from streamlit-aggrid.

lomnes-atlast-food avatar lomnes-atlast-food commented on June 12, 2024

@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)

from streamlit-aggrid.

lomnes-atlast-food avatar lomnes-atlast-food commented on June 12, 2024

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')

from streamlit-aggrid.

mc-its-sorted avatar mc-its-sorted commented on June 12, 2024

Thanks Steve

from streamlit-aggrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.