DBGridEh属性:1.FooterRowCount设为1
2.SumList.Active 设为 True
3.对于要合计的字段的Footer.ValueType设为fvtSum
特殊事件:GetFooterParams( Sender: TObject; DataCol, Row: Integer;
Column: TColumnEh; AFont: TFont;
var Background: TColor; var Alignment: TAlignment;
State: TGridDrawState;var Text: String);
例:------------------------------
begin
if Column.Field <> nil then
if column.Field.DataSet.active then
if lowercase(Column.Field.FieldName) = 'shouy_no' then
text := '(记录数:' + inttostr(column.Field.DataSet.recordcount) +')';
end;