Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Backcolor property of a grid's specific cell
Message
From
06/12/2000 16:11:15
 
 
To
06/12/2000 15:46:29
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00450099
Message ID:
00450113
Views:
32
>I would like to programattically change the backcolor of certain cells in a grid depending upon each indivdual cells value.
>For example I would like to change every cell in the grid backcolor to red if the value is negative. Is there a way to do
>This ?
>
>Thanks for your help
>Stephen J. Hunt
>Admit Computer Services Inc.

Use the Column.DynamicBackColor property - e.g., in the grid.Init
Local loColumn
For Each loColumn In this.Columns
  If Type(loColumn.Controlsource)$"NIY"
    loColumn.DynamicBackColor = "IIf("+loColumn.ControlSource+"<0, RGB(255,0,0), RGB(255,255,255))"
  EndIf
EndFor
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform