pass Data #3357
OtherwisePitt
started this conversation in
General
pass Data
#3357
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i got this function on pages3.py:
def on_row_select(e):
nonlocal selected_row
selected_row = e.control # Aggiorna la riga selezionata
cliente_id = selected_row.cells[0].content.value
print(f"Selected row: {selected_row}")
print(f"Cliente ID: {cliente_id}")
print(cliente_id)
page.go(f"/page2?cliente_id={cliente_id}")
i use this for select data from DataTable.
i want pass cliente_id to another module (page2.py) where i have some Textfield.
On page2.py i pass cliente_id on the view:
def view(page, cliente_id=None):
and got this function too:
def carica_campi(cliente_id):
with sqlite3.connect('anagrafica.db') as conn:
cursor = conn.cursor()
cursor.execute("SELECT * FROM ANF WHERE COD_C = ?", (cliente_id,))
cliente_data = cursor.fetchone()
but when def on_row_select(e) start, the pages2 doesnt reload all the textfield and i got blanck page. help me
Beta Was this translation helpful? Give feedback.
All reactions