Footer
TDataGridEh.Footer
property Footer: TDataGridFooterEh;published
Use this property to create and customize footer entries in the grid.
To make the values appear in the footer cells, you need to set the Footer property for the grid column.
The Footer property is of type TDataGridFooterEh and contains the following subproperties and events:
TDataGridEh.Footer Properties
Footer.Fill
property Fill: TBrush;Sets cell fill color and style for a footer cell.
Footer.Font
property Font: TFont;Sets cell Font properties for a footer cell.
Footer.FontColor
property FontColor: TAlphaColor;Sets cell color for the Font of a footer cell.
Footer.Rows
property Rows: TDataGridFooterRowsEh;Use this collection property to create footer entries in the grid.
For each item in the Footer.Rows collection in the grid, a corresponding row will be created in the footer area section of the grid.
TDataGridEh.Footer Events
Footer.OnGetCellManager
property OnGetCellManager: TDataGridFooterGetCellManagerEventEh;TDataGridFooterGetCellManagerEventEh = procedure(
Sender: TObject;
Params: TDataGridFooterGetCellManagerParamsEh) of object;The event is called for each rendering operation in the grid in the grid section - footer.
The event is called for each footer cell.
In the event, you can specify a new CellManager object that will be responsible for creating the grid cell object and managing the grid cell object.
If the Params.CellManager property is not assigned in the event handler, the default CellManager TDataGridEh.Footer.DefaultCellManager will be used.
Read more in the CellManagers section.
In the following example, when requesting the rendering operation of the first footer cell in the ColItemsTotal column, a special CellManager MyFooterCellManager is returned.
procedure TFormDataGridEventsTester.DataGridEh1FooterGetCellManager(
Sender: TObject;
Params: TDataGridFooterGetCellManagerParamsEh);
begin
if (Params.Footer.Index = 0) and (Params.Column = ColItemsTotal) then
Params.CellManager := MyFooterCellManager;
end;