Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the backcolor in a Grid
Message
From
09/01/2002 17:03:35
 
 
To
09/01/2002 13:35:08
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00602300
Message ID:
00602707
Views:
27
Hello Ravi.

I just tried this code but got the following VFP message:

"Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property"


As an alternative to entering this into the DynamicBackColor for each column in the property sheet, this code in the grid's Init works:
LOCAL lcBackColor
FOR EACH loColumn IN This.Columns
  IF loColumn.ColumnOrder > 1
    IF TYPE( loColumn.ControlSource ) = 'C'
	lcBackColor = "IIF( 'BLOCK' $ " + loColumn.ControlSource + ", RGB( 255, 0, 0 ), RGB( 0, 0, 255 ) )"
        loColumn.DynamicBackColor = lcBackColor
    ENDIF
  ENDIF
ENDFOR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform