Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping changes in Grid cells
Message
De
14/11/2003 15:57:42
 
 
À
14/11/2003 10:29:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00846055
Message ID:
00850049
Vues:
27
Dorris,

Without knowing the type of object in the cell (textbox, combobox, etc), I can only guess at what's going on.

I vaguely recall some problem like this a few years ago and we tracked it down to the fact that the BeforeRowColChange() sometimes triggers before the Valid() and LostFocus() of the control in the active cell. Consequently the change in value has not been propogated back to the control source of the control.

A better approach might be

(1) to do all this work in the LostFocus() of the control, not in the BeforeRowColChange() of the grid. Generally processing in the BeforerowColChange() should be limited to situations in which two columns on the grid interact in some manner. If the processing involves just the control in the active cell -- the best place to put any updating code would be the LostFocus() of the control.

(2) if you must do this process in the BeforeRowColChange() use the .Value of the control to get the new value rather than the value of the field linked to the control.

Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform