Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid isn't flexible enough
Message
De
15/03/1998 20:38:20
 
 
À
14/03/1998 21:44:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Divers
Thread ID:
00084219
Message ID:
00084739
Vues:
29
>>Thisform.Grid1.ColTotal.ControlSource="thisform.calctotal()"
>
>
>Edward,
>I don't understand this statement. Is this a built-in function "ColTotal"? Can you point me to a place that would better explain this technique. I have written column totaling logic before but I think you have a beter mouse trap.
>
>TIA
>Robert

Well, This is one of Advance feature in VFP, You are welcome to add any
additional properties, or procedure on the TOP design object!!
That is, if you design in Form Designer, You can add new properties or
procedure to Form. Of cos, if you have a formset, the new properties and
procedure will move to formset!!

For Class Designer, it will depend on what type of object you design,
but surely it will add the new properties or procedure on Topest object!!

First of all, you need to notise that the ControlSource property is to
display the new updated current record + UPDATE if the user change the value
or interactivechange on it if possible!!

Thus, it is meanless for VFP to update the calculation field!!
e.g. Round(UnitPrice * 7.73, 1) && [ Change Price unit to HKD ]

Actually, if you do it in a normal control object escept Column in Grid
You are completely fail to add the above example!!
But you can do it in Grid Control!!
The only thing to do is to remove old 'Text1' textbox and readd it again
(All tasks can do in normal Form Designer or Class Designer)
Then, You will find that the 'Text2' textbox controlsource value is:
Round(UnitPrice * 7.73, 1) && Quite Tricky ^_^"

Finally, up to The Thread sender problem, I suggest to add code:
Thisform.Grid1.refresh() && To any fields which affect the calculated value!!
Surely work even the user key-in {TAB} or {Enter} to next field!!

Thanks, if find wrong, tell me to adjust!! ^.^'
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform