streamlit-aggrid icon indicating copy to clipboard operation
streamlit-aggrid copied to clipboard

How to use custom_css option in Ag-Grid ?

Open 77777myfriend opened this issue 2 years ago • 1 comments

Hello, I need to change the default 'blue' color of Ag-Grid in the Streamlit app to 'red' color I didn't find any solution to add custom css to change the color of ag-grid table So I tried the following 2 ways to change the color, but it didn't work. Can any suggest the correct to do so ?

gb = GridOptionsBuilder.from_dataframe(df) grid_options = gb.build() grid_return = AgGrid(df, theme='blue', custom_css= {'background-color': '#ff0000'} )

st.markdown('', unsafe_allow_html=True)

77777myfriend avatar Jun 20 '22 12:06 77777myfriend

custom_css={".ag-row-hover": {"background-color": "red !important"},".ag-header-cell-label": {"background-color": "orange !important"}})

image

GGA-PERSO avatar Jul 29 '22 19:07 GGA-PERSO