>I'm trying to set the cells in a grid to different colours based on their value.
>So far I'm getting erratic results where (apparently) random cells are changing color when scrolling a line or cell at a time, sometimes effecting the whole column or neighbouring cells. I've tried refreshing the grid with no effect.
>I've tried the odd/even record example and that works fine, it just does not seem to to work properly at the grid.column.text.value level.
>
>Any suggestions?
>
>TIA
The simpliest way to set dynamic colors can be achieved by setting it directly on column property window.
Per column basis put it at property window of column1 dynamicbackcolor:
IIF(myfile.val1=1,RGB(0,0,0),IIF(myfile.val1=2,RGB(0,0,255),RGB(255,0,255)))
or
If per Row, manually coding:
Thisform.MyGrid.SetAll("DynamicBackColor","IIF(myfile.val1=1,RGB(0,0,0),IIF(myfile.val1=2,RGB(0,0,255),RGB(255,0,255)))
Even without firing refresh event, this works fine on our apps.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."