procedure TForm2.BitBtn2Click(Sender: TObject); var i:integer; hasil:integer; namacol:string; begin hasil:=0; namacol:=DBGrid1.Columns[3].FieldName; DBGrid1.DataSource.DataSet.First; while not DBGrid1.DataSource.DataSet.Eof do begin hasil:=hasil+DBGrid1.DataSource.DataSet.FieldByName(namacol).AsInteger; DBGrid1.DataSource.DataSet.next; end; edit2.Text :=floattostr(hasil); end;
scrif diatas untuk delphi6dan 7 kalau delphi2007 belom di coba mkin sama aja semua hanya ada perubahan sedikit untuk scrif di delphi2007
0 Comments