Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color at my grid
Message
From
09/03/2006 16:04:43
 
 
To
09/03/2006 05:56:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01102695
Message ID:
01102904
Views:
9
>hi all,
>any idea
>
>i put this code under at mygrid event inti, error message
>expretion is invalid.use avalid expression for dynamic back color property
>
>FOR EACH loColumn IN this.Columns
>	lcCS = 'this.' + loColumn.Name + '.ControlSource'
>	IF TYPE(EVALUATE(lcCS)) = 'N'
>		loColumn.DynamicBackColor = [IIF(EVALUATE(] + lcCS + [) < 10, RGB(225, 128, 128), RGB(128,255,128))]
>	ENDIF
>ENDFOR
>
>thanks
I don't know if this will work, but try
FOR EACH loColumn IN this.Columns
  lcCS = 'this.' + loColumn.Name + '.ControlSource'
  IF TYPE(lcCS) = 'N'
    loColumn.DynamicBackColor="IIF(EVALUATE('" + lcCS + "') < 10, RGB(225,128,128), RGB(128,255,128))"
  ENDIF
I changed the [] to ", not because there's anything wrong with using [] as text delimiters, but because my eye sees them as array subscripts. This way was easier for me to read.
Previous
Reply
Map
View

Click here to load this message in the networking platform