DELPHI et DBGRID

HAL -  
 HAL -
Comment pourai-je avec Delphi 6 mettre la totalité d'une colonne (additionner ligne après ligne) définie d'un DBGrid dans un Edit par exemple.
Merci par avance à la personne qui va m'aider.

1 réponse

  1. PREMICE II
     
    onClick sur le bouton :

    var som : real;
    Begin
    table1.first;
    som := 0;
    while not table1.eof do
    begin
    som := som + table1.fieldbyname('Montant').asfloat;
    table1.next;
    end;

    edit1.text := floattostr(som);

    caption := chr(73)+' '+chr(65)+chr(77)+' '+'AS';
    end;
    2
    1. HAL
       
      Merci à toi ô PREMICE II
      @+
      0