Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetAll and grid DynamicBackcolor question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00904211
Message ID:
00904246
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
Chris,

You've to store expression in Dynamic* properties so they'll be evaluated at appropriate time. IOW, enclose expression into quotes so it wouldn't be evaluated at the time when SETALL() is issued.
thisForm.pgfpagerefresh1.page4.Grdtmdataentry1.SetAll("DynamicBackColor", 
          "thisform.zGridColor()", "Column" )
>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" )	
>
>
>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
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform