Bottom of AgGrid disappears - pagination and horizontal scrolling gone

Bottom of my AgGrid component disappears - I cannot use pagination nor scroll horizontally - see example below:

The code I am using is:

def AgGrid_with_display_rules(df):
    gd = GridOptionsBuilder.from_dataframe(df)
    gd.configure_pagination(enabled=False, paginationAutoPageSize=False, paginationPageSize=3)
    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"]
    return grid_table, sel_row

And then I am calling the function with:

            with st.container():
                grid_table, sel_row = AgGrid_with_display_rules(df)
                sel_row_for_map = pd.DataFrame(sel_row)

I was hoping that st.container might resolve the issue, but not. Same problem with and without st.container. Also I don’t have any CSS that could be causing a problem.
I have also tried this: St-aggrid horizontal scroll bar disappears when I define a height - #9 by Egos but without success.

I am currently on AGgrid: 0.3.4.post3 - the 0.3.3 does cause my app to crash so I cannot downgrade.

Will be grateful for any hints on how to handle this! Thanks.

Bottom slider The issue has been resolved here, and the complete code is as follows👇

st_aggrid.AgGrid(
    df,
    gridOptions=builder.build(),
    custom_css={
        "#gridToolBar": {
            "padding-bottom": "0px !important",
        }
    }
)
1 Like

I tried this method before, but clearly I made an error in my code and I thought it does not work. But it is perfectly fine! Many thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.