Hi im building an app to save results of projects that we do at work and I want to update a table with aggrid and it will also update the sqlite DB that im using I manage to edit on the web app but it will not update the DB if anyone can tell me how it will be great this are the libraries that I imported:
import streamlit as st
import pandas as pd
from streamlit_option_menu import option_menu
from st_aggrid import AgGrid,GridUpdateMode
from st_aggrid.grid_options_builder import GridOptionsBuilder
if selected == 'Editor':
def data_upload():
dfa = pd.read_sql('SELECT * FROM LightSpeed_Project',con=sqlite3.connect('Performance.db',))
return dfa
dfe = data_upload()
gd = GridOptionsBuilder.from_dataframe(dfe)
gd.configure_pagination(enabled=True)
gd.configure_default_column(editable=True, groupable=True)
sel_mode = st.radio('Selection Type', options=['single', 'multiple'])
gd.configure_selection(selection_mode=sel_mode, use_checkbox=True)
gridoptions = gd.build()
grid_table = AgGrid(dfe, gridOptions=gridoptions,
update_mode=GridUpdateMode.SELECTION_CHANGED,
height=500,
allow_unsafe_jscode=True,
# enable_enterprise_modules = True,
theme='fresh')
sel_row = grid_table["selected_rows"]
st.subheader("Output")
st.write(sel_row)