Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color for certain records in grid
Message
From
10/12/2007 12:44:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01274403
Message ID:
01274476
Views:
10
>>any clue?
>>
>>thanks
>
>In the form's ACTIVATE i use...
>
>
>thisform.grd.SetAll("DynamicBackColor","thisform.zGridColor()", "Column" )
>
>
>And the method zGridColor does the following...
>
>
>cColor = RGB(255,255,255)	 && white
>DO CASE
>	*-----------------------------------------
>	*--- QA REJECTED
>	*-----------------------------------------
>	CASE tmpfcis.qa_reject
>		cColor = RGB(255,128,255)		&& purple
>
>	*-----------------------------------------
>	*--- QA COMPLETE
>	*-----------------------------------------
>	CASE tmpfcis.qacomp
>		cColor = RGB(51,174,57)		&& dark green
>		
>		
>	*-----------------------------------------
>	*--- QA Back To Inspector
>	*-----------------------------------------
>	CASE tmpfcis.qaback
>	
>		cColor = RGB(47,208,208)		&& teal green
>
>	*-----------------------------------------
>	*--- Asset Inventory Not Complete
>	*-----------------------------------------
>	CASE ! tmpfcis.parinvst OR ! tmpfcis.parinvel		
>		cColor = RGB(255,255,128)		&& yellow
>
>ENDCASE
>RETURN cColor
>
>
Again, neighbor, I'd have to disagree. This method would be called for every refresh of every cell that has it in the DynamicBackColor property. Nothing wrong with having a method, it's how and when do we call it.

My proposal (and I wrote about this a dozen times already, should have written a FAQ by now :) is to have the result of this method in an integer field, and have the name that field as the DynamicBackColor expression. Then there's nothing to calculate, and there's no code being called repeatedly. It's called only when data change. And I've seen about factor of 20 or better speed increase when doing it this way.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform