Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Summing values in a Grid Column
Message
 
À
07/01/2005 23:33:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00975355
Message ID:
00975362
Vues:
13
Thanks for you help!

I got it to work using the temp cursor.

:)

>>Thanks for the quick reply!
>>
>>I actually want to leave the textbox stationary in the corner, i having the problem of calculating the total for the column values.
>>
>>I've tried setting the textboxes value to =sum(payments.amount) but this doesn't seem to work. I must be missing something simple...
>
>Well, you don't have the kind of formulae you have in Excel. Some of your options for the actual calculation include:
>
>
>calculate sum(payments.amount) to SomeVariable
>
>
>or:
>
>
>sum amount to SomeVariable
>
>
>or:
>
>
>select sum(amount) as amount from Payments into cursor Temp
>
>
>... and then use the column Temp.Amount.
>
>Another question is when this calculation should be triggered. This might be once on form startup (Form.Init()), or every time the user changes a value in the grid - the events in the latter case might be Valid() for each TextBox within the Columns, or Grid.AfterRowColChange(). The latter is simpler, but it will do the calculation even if no changes have been made.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform