Comment calculer un colone dans un dbgrid ?

Pierre - 28 déc. 2000 à 20:03
 int19h - 28 déc. 2000 à 20:45
Dans ma feuille j'ai un dbgrid et je veux faire le calcule total de ma colone PrixTotal. Comment?

Merci

1 réponse

Ca doit etre un truc du genre :

DBGrid1.Col = 1
Total=0

for a=0 to Nmbre_de_ligne
DbGrid1.Row=Numero_Colone_Prix
Total=Total+Val(DbGrid1.Text)
next

DBGrid.Col=numero_Colonne_Prix_Total
DBGrid.row=numero_Ligne_Prix_Total
DbGrid1.Text = cstr(Total)

Enfin, un truc comme ca...
0
Rejoignez-nous