'Usage
Dim instance As SummaryCell
Dim value As String
instance.StatFieldName = value
value = instance.StatFieldName
[Description("The fieldname of the column whose values are to be used to calculate the StatFunction.")]
[Category("Data")]
[RefreshProperties(RefreshProperties.All)]
[ApplyToDesigner(true)]
[TypeConverter("Xceed.Grid.Design.StatFieldNameConverter,Xceed.Grid.v4.3.Design,Version=4.3.25208.5768,Culture=neutral,PublicKeyToken=ba83ff368b7563c6")]
public string StatFieldName {get; set;}
The statistics for a column other than the SummaryCell's parent column can be calculated and displayed in the cell by setting the StatFieldName property. The StatFieldName property indicates for which column the statistics will be calculated.
In the case where the column fieldname specified by the StatFieldName property does not exist, "#InvalidStatFieldName#" will be displayed rather than the statistical result, where "InvalidStatFieldName" represents the string passsed to the StatFieldName property.
Example
The following example demonstrates how to calculate the average value of the "Quantity" column and display the result in the "UnitPrice" SummaryCell.
Dim unitPrice As SummaryCell = CType( sumRow.Cells( "UnitPrice" ), SummaryCell )
unitPrice.StatFieldName = "Quantity"
unitPrice.StatFunction = StatFunction.Average
unitPrice.TitleFormat = "The average ordered quantity is: "
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2