DBGRID

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
frigs
Posts: 1
Joined: Fri 12 Jan 2007 23:23

DBGRID

Post by frigs » Sat 13 Jan 2007 00:01

i have one dbgrid :

co1|col2
a | b
c | d
e | f
g | h
-------------
i | j

a=100
b=100
c=300
d= b+c = 400
e=600
f=d+e=1000
g=200
h=f+g=1200
i=sum(col1)=1200
j=h=1200


===================

i fill col1 from DB
how to automate fill col2

============
sorry for my bad english

boudewijn
Posts: 4
Joined: Fri 30 Sep 2005 18:13
Location: the netherlands

Post by boudewijn » Mon 15 Jan 2007 08:39

Try using calculated fields.
create a calc. field in your fieldlist (e.q. tmysql or tmytable)
then fill the oncalc event with the desired formula.

Post Reply