Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the backcolor in a Grid
Message
De
10/01/2002 01:26:22
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
À
09/01/2002 16:58:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00602300
Message ID:
00602868
Vues:
22
Hi Marcia:

It works - yes and no.

Her is what I am trying to accomplish. Grid1 has 8 columns. The 1st column has the time. Columns 2-8 are for the 7 days in a week. The date on column 2's header is dependent onthe current date. I placed your code in the DynamicBackcolor property of Columns 2-8. If I choose a date from the calendar object, then the grid is repopulated by an SQL statement which displays the data for 7 days beginning from the date I selected. Here are the observations:

- When the form containing the grid is launched, Columns 2-8 are blue
- When I selected March 18, 2001 (cuz I have some test data for that date), I get the message "Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property". Then I loose the colors after that.
- I then set the sytem date to March 18, 2001 and launched the form
- All cells in the columns without the word "BLOCK" were in blue and the ones with "BLOCK" were in red.
- However, when I click another date on the calendar (even the next day 19th) I get the same message "Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property".

Thanks.

- Ravi


>Hello Ravi.
>
>I just tried this code but got the following VFP message:
>
>"Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property"

>
>As I said, it was untested < s >. This does work: put this expression into the DynamixBackColorProperty for each column you want to set:
>
>IIF( 'BLOCK' $ < Alias.Field >, RGB( 255, 0, 0 ), RGB( 0, 0, 255 ) )
>
>where you substiture the correct alias and field name in the expression above and remove the angle brackets.
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform