Created
February 7, 2023 18:59
-
-
Save GustavoGLD/a8eb3e2c05cb35ac83814e10675b2f73 to your computer and use it in GitHub Desktop.
streamlit-aggrid checkbox minimal example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from st_aggrid import AgGrid, GridUpdateMode | |
import pandas as pd | |
df = pd.DataFrame({"Numeros": list(range(250))}) | |
gridOptions = { | |
# enable Master / Detail | |
"masterDetail": True, | |
"rowSelection": "multiple", | |
# the first Column is configured to use agGroupCellRenderer | |
"columnDefs": [ | |
{ | |
"field": "Numeros", | |
"checkboxSelection": True, | |
"editable": True, | |
}, | |
], | |
"defaultColDef": { | |
"flex": 1, | |
}, | |
} | |
AgGrid( | |
df, | |
gridOptions=gridOptions, | |
height=500, | |
allow_unsafe_jscode=True, | |
enable_enterprise_modules=True, | |
update_mode=GridUpdateMode.SELECTION_CHANGED | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment