Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Summing values in a Grid Column
Message
 
À
07/01/2005 22:52:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00975355
Message ID:
00975360
Vues:
14
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...

:)

>>Hi,
>>
>>I've got a grid with a list of payments received from a customer. I'd like to display a total of all payments for the current customer into a readonly textbox.
>>
>>Is there an easy way of doing this?
>
>Not precisely trivial, but yes, you can add up the values - several methods for that - and put the result in the TextBox. The tricky part is to keep the TextBox alligned with the corresponding Grid Column, because the user can (a) scroll off, (b) rearrange the column order, and (c) change the column widths.
>
>You have to intercept each of the corresponding events, and change the .Left value of your TextBox. The calculation to make it allign with the correct Column is, surprisingly, the easiest part: just use the ObjToClient() function to get the offset from the left side of the Form.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform