how to save changes in streamlit-aggrid

Viewed 56

I created db with sqlite3. How can I save it on the db when I open the table with aggrid and make changes?

example:Before Edit

----------------------------------------

After Edit

When I refresh the page after making the above changes, it looks like the first photo. As a result, the changes are not saving.

with tab3:
  c.execute("SELECT * FROM ogrenciler")
  ogrenciler = c.fetchall()
  tablo = pd.DataFrame(ogrenciler)
  tablo.columns = ["Ad Soyad      ", "Telefon No  ", "TC No      ", "Doğum Tarihi   ", "Kuşak    ", "Kayıt Tarihi ",
                   "Ekim", "Kasım", "Aralık"]
  gb = GridOptionsBuilder.from_dataframe(tablo)
  gb.configure_columns(
    ["Ad Soyad      ", "Telefon No  ", "TC No      ", "Doğum Tarihi   ", "Kuşak    ", "Kayıt Tarihi ", "Ekim", "Kasım",
     "Aralık"], editable=True)
  go = gb.build()
  AgGrid(
    tablo,
    gridOptions=go,
    fit_columns_on_grid_load=True, )
0 Answers
Related