Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh after checkbox in grid changes value
Message
De
09/05/2005 15:08:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Refresh after checkbox in grid changes value
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Divers
Thread ID:
01012247
Message ID:
01012247
Vues:
63
I have a grid where the user needs to select some records. The last column has a checkbox (text1 removed, .currentcontrol="chk") bound to a logical field. Grid's recordsource is a readwrite cursor.

My problem is the total field, in another cursor, shown in a readonly textbox below the grid. I'm calling the counting code from checkbox's .interactive change, and it sometimes fires, sometimes not. Most often, it works on/off, i.e. once works, once doesn't. I've tried several known tricks - before calling the code, do

1. dodefault()
2. this.value=this.value
3. this.setfocus()
4. go recno()
5. calling the calculation from .lostfocus instead

None of this works - the calculation is never sure to see the last change. It either sees the last change sometimes, or never - depending on which trick I try. So, how do I get the change written into the controlsource and be sure that the calculation routine sees it? From where do I call it?

Update: the last sentence gave me the idea. I'm now doing this:
replace (this.ControlSource) with this.Value
nodefault
thisform.de.CalculateIM()
And it works. Thanks to Auntie Emma.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform