Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to put colors to records in Grid?
Message
From
05/08/1999 11:56:33
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249756
Message ID:
00250223
Views:
23
Nigel,

The example from Help as follows:-

frmMyForm.grdGrid1.SetAll("DynamicBackColor", ;
"IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255) ;
, RGB(0,255,0))", "Column")

where it based on recno, and I need it to be based on fields. That is where I'm having problem with the coding for based on fields.

Thanks,
Gan

>>All,
>>
>>I have my appended-records from a CURSOR displayed in a grid. The grid will display all the newly added records before the user choose "Save To Database". In the grid, I need to assign colors to rows which have the same value from a field. Example,
>>
>>Year CustomerID
>>1997 A110
>>1997 A111
>>1997 A113
>>1998 B456
>>1998 B456
>>
>>where, all rows which contain "1997" will be having "Yellow" and the next group will have "White". Then the 3rd group, will having "Yellow" again.
>>
>>So, any idea of how to make this effect? Adding code in DynamicBackColor?? How?
>>
>>
>>Thanks,
>>Gan
>
>Look in the help for dynamicbackcolor, there is a good working example there based on record number. Just base yours on field contents instead. Also uses the SetAll() method.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform