Changing color of text in a repeating panel column at runtime

What I’m trying to do:
Using a repeating panel with 4 columns defined and working using runtime set items list. But I want to be able to change the color of the text in a particular column depending on the value for the column good:green, bad:red – for ex.
If something is printed in a column via {‘column_name’:‘Active’} how can I change the color that text using something like {‘column_name’:‘Active’, ‘color’:‘green’}
What I’ve tried and what’s not working:
I tried using the foreground color items setting items[‘color’] and then adding color to the row dictionary after the column definition as above. I expected that might change the color of the text of the whole row, but it has no effect.

Code Sample:

# this is a formatted code snippet.
# paste your code between ``` 

Clone link:
share a copy of your app

  1. Find the component (e.g., the Label or TextBox) that displays the text. If you are coloring all text in the entire row, the component is the row-template itself.
  2. Bind that component’s foreground or background property to the corresponding value in the row (e.g., item['color']).

Edit: more details here:

1 Like