property Footer: TColumnFooter
Description
This property is responsible for the footer of the component.
The class has the following properties
Property |
Type |
Description |
Alignment |
TAlignment |
Sets the alignment of the footer content in the column. Available values: taCenter, taRightJustify, taLeftJustify |
Caption |
String |
Footer text. |
Color |
TColor |
Background Color. |
FormulaKind |
TFormulaKind |
Formula for the calculation. Available values: fkNone, fkAverage, fkCount, fkDistinct, fkMaximum, fkMinimum, fkSum, fkCustom |
FormatMask |
String |
Allows you to set the format for numbers, text or date/time. |
FormatMaskKind |
TFormatMaskKind |
Defines the way the mask in the FormatMask property is handled. Available values: mkText, mkFloat |
TextAfter |
String |
Specifies the text before the calculated value. |
TextBefore |
String |
Specifies the text after the calculated value. |
Example
// format the value in the basement for the columns of the numeric type (REAL, CURRENCY, INTEGER)
// more details about using formatting http://docwiki.embarcadero.com/Libraries/XE3/en/System.SysUtils.FormatFloat
procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
TNxNumberColumn(Form1.TreeView1.Columns[0]).Footer.TextBefore := Price: ';
TNxNumberColumn(Form1.TreeView1.Columns[0]).Footer.TextBefore := '$';
TNxNumberColumn(Form1.TreeView1.Columns[0]).Footer.FormatMaskKind := mkFloat;
TNxNumberColumn(Form1.TreeView1.Columns[0]).Footer.FormatMask := '#,##0.00';
end;