1

Topic: dxDBGrid property SummaryGroup

The example took from ExpressQuantumGrid
{=========================================================}
//function KorrektirovkaSprav _ (hWnd: THandle; NFile: String;
//ibqQuery: TIBQuery; dsQuery: TDataSource; ibuQuery: TIBUpdateSQL; ibqRab: TIBQuery)
//:Integer;
function KorrektirovkaSprav _ (hWnd: THandle; NFile: String; ibqRab: TIBQuery)
:Integer;
{========================================================}
var
GridColumn: TdxDBTreeListColumn;
SummaryItems: TdxDBGridSummaryItems;
NewSummaryItem: TdxDBGridSummaryItem;
begin
.................................
8: begin//Grid. Sum
if not GridSpr [GridNom].IsGridMode then begin
GridColumn: = GridSpr [GridNom].ColumnByName (' dxDBGrid1Event_Date ');
//GridColumn: TdxDBTreeListColumn;
if GridColumn. SummaryGroup <> nil then begin
^^^^^^^^^^^^^^
Speaks there is no such property though in the help is
//obtains a summary group
SummaryItems: = GridColumn. SummaryGroup. SummaryItems;
//creates a new summary item
NewSummaryItem: = SummaryItems. Add;
//specifies properties of the new summary item
NewSummaryItem. ColumnName: = ' dxDBGrid1Event_Name ';
NewSummaryItem. SummaryField: = ' Ticket_Price ';
NewSummaryItem. SummaryFormat: = ' Max Ticket Price is #,.00 ';
NewSummaryItem. SummaryType: = cstMax;
//refreshes summaries
GridSpr [GridNom].RefreshGroupColumns;
end;
end;
}
end;
end;
end;
frmKorrektSpr. ShowModal;

2

Re: dxDBGrid property SummaryGroup

The mistake ^^^^^^^^^^^ should show on summaryGroup