Page 1 of 1

Color the background's cell in a grid view

Posted: Sat May 14, 2022 8:54 pm
by yvesf
Hello,

I would like to color the background's cell in a grid view. Let's assume, I have a status which takes different color based on its name.
My column status takes the following different value :
Done - green color
In Progress - orange color
Urgent - red color.

Depending on the status value, I would like to have the cell's status changing from red, orange or green color.
cellcolor.PNG
Many thanks for anyone that knows how to perform that. I need to know what type of column do I have to create and how to associate a color background to specific values.

Yves

Re: Color the background's cell in a grid view

Posted: Sat May 14, 2022 9:10 pm
by kev1n
See here: viewtopic.php?t=11588

Then use a switch statement for the different values.

Re: Color the background's cell in a grid view

Posted: Sun May 15, 2022 8:07 am
by yvesf
Thanks Kev1n, brilliant !!! In general, where do you put the functions ? I have put them in the header giving them accessible everywhere in the application, is there another place to put them ?

Yves

Re: Color the background's cell in a grid view

Posted: Sun May 15, 2022 9:02 am
by kev1n
Generally speaking, put it in the header or in an external file, if more than one form is going to use the function or in the form's custom code if it's specific to a form/used in one form.

Re: Color the background's cell in a grid view

Posted: Mon Jul 18, 2022 9:00 pm
by kev1n
I hope that helped..