Page 1 of 1

Change Image in a grid based on value ?

Posted: Tue Aug 29, 2017 4:10 am
by Apprentice
Hi there,
I hope my question is okay to ask here, as I don't know if it's just the fact that I have not as much experience so far.
Currently I am building my very first more complex program and I have stumbled over a problem I'd like to get solved.

I have created a grid that has an Image in the first column for every row.
Now I'd like that image to Change based on value.
The two different values in my database are aktiv and null.
Is there a possibilty to have the same element but with different Images based on those values?
What I want to achive is value aktiv = green dot, value null = red dot.


Thank you for your help.
Kind regards
Yvonne

Re: Change Image in a grid based on value ?

Posted: Tue Aug 29, 2017 4:14 am
by Scott Klement
Yes, of course. Just bind a variable to the image source property. Change the variable to the proper image url/path before writing each grid row.

Re: Change Image in a grid based on value ?

Posted: Thu Aug 31, 2017 5:39 am
by Apprentice
Thank you very much.
It worked without any Problem.
I am just in the process of learning coding so everything is quite new to me.
Hopefully my newbie questions wasn't a Problem!

With Kind regards
Yvonne