Tutorials - Data Grids: Displaying Data In Tables

The “Data Grids: Displaying Data In Tables” tutorial is hard to follow due to missing steps and it seems the interface has changed since the tutorial was created.

  1. The tutorial does not explain what type of Theme I should use.

  2. When I place a “Data Grid”, the top and left side boxes do not automatically appear.

  3. This section below doesn’t explain where to add the information or what the page should look like when finished:
    It contains a Repeating Panel that you can hook up to your Data Table in the usual way - an accessor in a Server Module:

     ```
     @anvil.server.callable
     def get_employees():
       return app_tables.employees.search()
     ```
     
     which is called from the Form’s `__init__` method:
    
  4. I can’t find the auto header setting

  5. There is no explanation of how to add the page number box.

When I started with Anvil, the first 15-20 minutes of this video changed my life: Anvil: Full-stack Web Apps with Nothing but Python - YouTube

1 Like

Unfortunately, I need some help on dropdowns and changing data tables. Do you have any tutorials on that?

This minimal example should clarify some basics:

https://anvil.works/build#clone:ZWQ5HE64BRETOPDX=D5EQNGAITKRPIXPTNBC4RYXH

You typically work with the .selected_value property of dropdown widgets just like you work with the .text property of text widgets. Take a look at the examples here:

If that doesn’t answer your questions, take a look at www.pythonanvil.com

If you have any specific question about how to use the dropdown widget to change values in data tables, share a minimal code and clone example here.