Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enabling and disabling rows/columns in a Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00960928
Message ID:
00961012
Vues:
12
Thanks, Nadya. That seems to work. I tend to forget that, even though the grid has may rows, only one is actually active at a time, so setting the state of the entire grid only really affects the row you happen to be in at the moment.

Of course, logically, setting the .Enabled property for each of the controls in the grid should work as well. Unfortunately, behind the scenes something seems to be getting evaluated late.

I DID discover something else though. Even though I'm not directly setting the .ReadOnly property of the column and its CurrentControl, the .ReadOnly property of the CurrentControl gets set to .T. when its .Enabled property is set to .F. - but only after the control loses focus. You have to move out of the control and back into it to see that the value changes. VFP (or the control itself) must be doing it automatically.

At first, I thought this might be my problem. However, resetting the .ReadOnly property in the .AfterRowColChange event does not seem to affect the control at all. You still have to move out of the control and back into it before it becomes modifiable. It appears that the only way to make it work the way I want it to is to forget about the .Enabled and .ReadOnly properties at the column/current control level and just use the grid-level .ReadOnly property.

Thanks again,
John
John Groft
Consultant
Computer Task Group, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform