Xceed Grid for WinForms v4.3 Documentation
ResultDataType Property
Example 


Xceed.Grid.v4.3 Assembly > Xceed.Grid Namespace > SummaryCell Class : ResultDataType Property
Gets or sets the datatype of the statistical function result.
Syntax
'Declaration
 
<DescriptionAttribute("The datatype of the statistical function result.")>
<CategoryAttribute("Data")>
<ApplyToDesignerAttribute(True)>
<RefreshPropertiesAttribute(RefreshProperties.All)>
<TypeConverterAttribute("Xceed.Grid.Design.DataTypeConverter,Xceed.Grid.v4.3.Design,Version=4.3.20076.12375,Culture=neutral,PublicKeyToken=ba83ff368b7563c6")>
Public Property ResultDataType As Type
'Usage
 
Dim instance As SummaryCell
Dim value As Type
 
instance.ResultDataType = value
 
value = instance.ResultDataType
[Description("The datatype of the statistical function result.")]
[Category("Data")]
[ApplyToDesigner(true)]
[RefreshProperties(RefreshProperties.All)]
[TypeConverter("Xceed.Grid.Design.DataTypeConverter,Xceed.Grid.v4.3.Design,Version=4.3.20076.12375,Culture=neutral,PublicKeyToken=ba83ff368b7563c6")]
public Type ResultDataType {get; set;}

Property Value

A System.Type representing the datatype of the statistical function result. By default, the datatype of the column specified in the StatFieldName property will be used. If the StatFieldName property has not been set, the parent column's datatype will be used. If the cell does not have a parent column, DefaultResultDataType will be used.
Example
The following example demonstrates how to set the ResultDataType property so that the values of a column whose datatype is int will be displayed as "double". For example, this "conversion" could be used to display decimals when calculating the average of a column whose datatype is "int". If the values contained in the "First" column are "1" and "2", setting the ResultDataType property to "double" will result in the average being "1.5". If the ResultDataType property had not been set, thus remaining at its default value of "int", the average would have been "1" rather than "1.5" (banker's round).
CType( sumRow.Cells( "First" ), SummaryCell ).StatFunction = StatFunction.Average
CType( sumRow.Cells( "First" ), SummaryCell ).ResultDataType = GetType( Double )
( ( SummaryCell )sumRow.Cells[ "First" ] ).StatFunction = StatFunction.Average;
( ( SummaryCell )sumRow.Cells[ "First" ] ).ResultDataType = typeof( double );
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

See Also

Reference

SummaryCell Class
SummaryCell Members