Table striped effect

I thought about this once and used this:

def color_alternating_rows(self):
    for i, r in enumerate(self.repeating_panel_1.get_components()):
      if i%2:
        r.background='theme:Gray 200'

I put that method on the “parent” form and call it from the template form on the “show” event (this way when you scroll through the data grid’s pages, the row highlighting is applied when the new page is shown).

Probably better ways, but it’s short and sweet-ish.

3 Likes