Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetAll and grid DynamicBackcolor question
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SetAll and grid DynamicBackcolor question
Miscellaneous
Thread ID:
00904211
Message ID:
00904211
Views:
62
I've done this before but am missing something. I have a grid and i am coloring each row based on a condition of each record. I have a call to a form method that returns an RGB color, but it appears as though the first row encountered dictates the color of all the rows. Any ideas?

In the ACTIVATE of the pageframe page, i have:
thisForm.pgfpagerefresh1.page4.Grdtmdataentry1.SetAll("DynamicBackColor", thisform.zGridColor(), "Column" )	&& backcolor
The method zGridColor looks like:
cColor = "RGB(255,255,255)"	 && white
DO CASE
   CASE taskcomp	                  && done... GREEN
      cColor = "RGB(215,255,215)"
   CASE EMPTY(taskend) AND ! taskcomp AND taskbeg <= DATE() + 2
      cColor = "RGB(255,222,213)"	&& due soon  RED
   CASE EMPTY(taskend) AND ! taskcomp AND BETWEEN(taskbeg,DATE()+2,DATE()+9)
      cColor = "RGB(250,253,193)"    && yellow
   OTHERWISE
      cColor = "RGB(255,255,255)"  	&& white
ENDCASE
RETURN cColor
Next
Reply
Map
View

Click here to load this message in the networking platform