'Declaration <DescriptionAttribute("A variable containing string representing the text displayed by the GroupManagerRow.")> <CategoryAttribute("Appearance")> <AmbientValueAttribute("")> <LocalizableAttribute(True)> <ApplyToDesignerAttribute(True)> Public Property TitleFormat As String
'Usage Dim instance As GroupManagerRow Dim value As String instance.TitleFormat = value value = instance.TitleFormat
[Description("A variable containing string representing the text displayed by the GroupManagerRow.")] [Category("Appearance")] [AmbientValue("")] [Localizable(true)] [ApplyToDesigner(true)] public string TitleFormat {get; set;}
Property Value
A variable containing string representing the text displayed by the GroupManagerRow.
The following variables are supported by default:
%COLUMNFIELDNAME% | Represents the value of both the GroupBy and FieldName properties. |
%GROUPKEY% | Represents the value of the Key property. |
%GROUPTITLE% | Represents the value of the Title property. |
%DATAROWCOUNT% | Represents the value returned by the GroupBase.GetSortedDataRowCount method when its recursive parameter is set to true. |
%COLUMNTITLE% | Represents the value of the Title property. |
%COUNT: % | The result of the Count statistical function. |
%MAX: (see below for usage)% | The result of the Maximum statistical function. |
%MIN: (see below for usage)% | The result of the Minimum statistical function. |
%SUM: (see below for usage)% | The result of the Sum statistical function. |
%AVG: (see below for usage)% | The result of the Average statistical function. |
%STDEV: (see below for usage)% | The result of the Standard Deviation statistical function. |
%STDEVP: (see below for usage)% | The result of the Standard Deviation Population statistical function. |
%VAR: (see below for usage)% | The result of the Variance statistical function. |
%VARP: (see below for usage)% | The result of the Variance Population statistical function. |
%MEDIAN: (see below for usage)% | The result of the Median statistical function. |
%MODE: (see below for usage)% | The result of the Mode statistical function. |
%GEOMEAN: (see below for usage)% | The result of the Geometric Mean statistical function. |
%HARMEAN: (see below for usage)% | The result of the Harmonic Mean statistical function. |
%RMS: (see below for usage)% | The result of the Root Mean Square statistical function. |
In the case of the variables that represent statistical functions (COUNT, MAX, MIN, SUM, AVG, STDEV, STDEVP, VAR, VARP, MEDIAN, MODE, GEOMEAN, HARMEAN, and RMS), additional parameters must be provided within the variable after the colon (:). These parameters are the fieldname of the column from which the data is retrieved, the (optional) format specifier with which the result of the statistical function is displayed, and the (optional) group level for which the statistical function is calculated.
%COUNT: ["]column_fieldname["] [ format=["]format_specifier["] ] [ level=running_stat_group_level ]%
All items placed in square brackets [] are optional. If the column_fieldname and/or format_specifier parameters contain spaces, quotes must be used. If a running_stat_group_level is not specified, -1 (current group) is assumed.
groupManagerRow.TitleFormat = "A minimum of %MIN:Quantity% units were ordered at an average price of
%AVG:UnitPrice format=c%.";
The format of a mathematical function depends on 2 things: the function itself and the datatype of the column whose values are used for the statistical function.
The following table provides a list of supported and unsupported format specifiers relative to the datatype of the column whose values are used for the statistical function.
Statistical function | Column datatype | Datatype sent to the format specifier | Unsupported format specifiers |
---|---|---|---|
COUNT | Any | Int64 | R |
MAX, MIN, MODE | Anything that implements the IComparable interface. | Always the same as the datatype of the column specified by the column_fieldname parameter. | |
SUM | Integral type* | Int64 | R |
Floating point types** | Double | D and X | |
Decimal | Decimal | D, X and R | |
AVG, VAR, VARP, HARMEAN | Integral* and Floating point** types | Double | D and X |
Decimal | Decimal | D, X and R | |
STDEV, STDEVP, GEOMEAN, RMS | Integral*, Floating point**, and Decimal types | Double | D and X |
MEDIAN | Integral type* (even item count) | Double | D and X |
Integral type* (odd item count) | Int64 | R | |
Floating point types** | Double | D and X | |
Decimal | Decimal | D, X and R |
* Integral types : Byte, SByte, Char, Int16, UInt16, Int32, UInt32, Int64, UInt64
** Floating point types: Single and Double
The values are rounded in the same manner as the string.Format round, meaning a banker's round.
Hint: You can use F0 instead of D. It will have the same behavior and will work for either integral types or floating point types.
groupManagerRow.TitleFormat = "%MIN:Quantity format=\"\"val: \"0.00\"%";
will result in "val: 9.00" without the quotes, for the value "9". The internal quotes are necessary when the format_specifier contains a label (ie. "val: " ).