Page 1 of 1

DBGRID

Posted: Sat 13 Jan 2007 00:01
by frigs
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

Posted: Mon 15 Jan 2007 08:39
by boudewijn
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.