I am making the rows in a datagrid editable - foolowing the tutorial closely, except that data coms from upling and MsSql. I do not think the uplink-part is a problem.
I have tried repeatedly and stumble into the same situation again and again. I double click the repeating panel, and get the row template. Regardless if I edit it or not, when I run it, the running screen says “No such form 'person.RowTemplate2” and the output says: AttributeError: module 'MsSql_database_qftest.person.RowTemplate2._anvil_designer' has no attribute 'personTemplate'
There is a RowTemplate2 in the form-select part.
(In this situation I am really happy with the version and branch system in Anvil. )
There is not much code yet:
from ._anvil_designer import personTemplate
from anvil import *
import anvil.server
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
class person(personTemplate):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
persons = anvil.server.call('get_person')
self.person_repeating_panel.items = persons
def search_button_click(self, **event_args):
searchResult = anvil.server.call('search_person',self.search_box.text)
self.person_repeating_panel.items=searchResult
def search_box_pressed_enter(self, **event_args):
self.search_button_click()
def add_button_click(self, **event_args):
anvil.server.call('add_person',self.navn_input_box.text, self.telefon_input_box.text,self.alder_input_box.text)
all = anvil.server.call('get_person')
self.person_repeating_panel.items = all
Clone link:
https://anvil.works/build#clone:QSISEOAJXWSZRAZ3=GNJYXEARK2MFGG2Z5RSFJ2U7