Hello
The value of the footer depends on which grouping row you are on in the grid.
If you want to get the footer value for the current grouping row for the PartPrice column, you can use the following code:
Code:
procedure TfrDataGrouping.Button1Click(Sender: TObject);
var
ColIndex: Integer;
FooterVal: Variant;
GroupNodeRow: TGroupDataTreeNodeEh;
begin
GroupNodeRow := DBGridEh1.DataGrouping.CurDataNode;
if (GroupNodeRow.NodeType <> dntDataGroupEh) then
begin
ShowMessage('Current row is not group caption');
Exit;
end;
ColIndex := DBGridEh1.FieldColumns['PartPrice'].Index;
FooterVal := GroupNodeRow.FooterItems[0].FooterValues[ColIndex];
ShowMessage(VarToStr(FooterVal));
end;