formulas en el dbgrid
Personalmente utilizo el evento ONCOLEXIT o ONENTER del DBGRID y coloco por ejemplo la siguiente instruccion:
if (dbg_insu.SelectedIndex=4) then
begin
xtotal:=roundto(dbg_insu.Fields[2].Asfloat*dbg_insu.Fields[4].asfloat,-2);
end;
dbg_insu es el dbgrid
|