Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using GRID to enter data
Message
De
09/04/2008 03:05:59
 
 
À
08/04/2008 22:04:24
Fabian Borghi
Xenon Information Technology
Itaparica, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01309223
Message ID:
01309237
Vues:
7
Hi Fabian,

instead of using several interactivechange methods with same code you could try it with bindevent().
In case your grid is an individual class add a method called 'CalculateSum'
in grid.init, otherwise add this method i.e. to your form. Then you bind all needed textboxes like this:
BINDEVENT(Thisform.Grid1.Column3.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
BINDEVENT(Thisform.Grid1.Column4.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
BINDEVENT(Thisform.Grid1.Column5.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
BINDEVENT(Thisform.Grid1.Column6.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
Then within your Method 'CalculateSum' all you have to do is calculate the cursor's field values and write back into the cursor's target field and don't use the textbox values for calculation.
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform