Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using grid cell content to update text field on form
Message
De
19/04/2000 12:30:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00361304
Message ID:
00361373
Vues:
14
Gerry,
It would work (programmaticchange doesn't work because code doesn't change it:). IMHO it's luxury to have a property to save on entry value. If you would do it that way instead of creating custom property you might consider using "tag" property of control (a ready storage:) In any case if you're using buffering beware you might inadvartently try to do math upon null values (newly added record for example). nvl() helps there.
PS: If MD in signature is exactly what I think then we're on the same boat :)
Cetin

>Other than my math being off, it appears to be working now. My mistake was not in using the GotFocus, but using ProgrammaticChange to do the updates. That method wasn't firing at all.
>
>Thanks AGAIN for the help, all!
>-- Gerry
>
>>Yeah, but I figured since you said this was not working, I would point you to the LostFocus. Did you get this to work. I do something similar in an Invoice grid using Got/LostFocus and it works for me.
>>
>>>Actually, I had similar code in the VALID for the applicable cell. I ASSumed it might be more efficient for it to be updated only when the user changed something, which is what VALID's are for, right?
>>>
>>>- Gerry
>>>
>>>>>I did. Here's the code from txtDebit.GotFocus :
>>>>>
>>>>>THISFORM.OrigDebit = THIS.VALUE
>>>>>
>>>>>- Gerry
>>>>
>>>>Now the code in LostFocus? Depending on Debit or Credit column:
>>>>local lnDiff
>>>>lnDiff = This.Value - ThisForm.OrigDebit_or_Credit
>>>>if lnDiff <> 0
>>>>   ThisForm.txtRunningTotal.Value = ThisForm.txtRunningTotal.Value <b>+ or -</b> lnDiff
>>>>endif
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform