GrapeCity MultiRow Windows Forms Documentation
MathStatistics Constructor(StatisticsType,String,Boolean)
Example 


A StatisticsType that indicates which calculation strategy to use.
The cell name.
true to exclude the hidden rows when using the statistic; otherwise, false.
Initializes a new instance of the MathStatistics class.
Syntax
Public Function New( _
   ByVal statisticsType As StatisticsType, _
   ByVal cellName As String, _
   ByVal excludeHiddenRows As Boolean _
)
Dim statisticsType As StatisticsType
Dim cellName As String
Dim excludeHiddenRows As Boolean
 
Dim instance As New MathStatistics(statisticsType, cellName, excludeHiddenRows)
public MathStatistics( 
   StatisticsType statisticsType,
   string cellName,
   bool excludeHiddenRows
)

Parameters

statisticsType
A StatisticsType that indicates which calculation strategy to use.
cellName
The cell name.
excludeHiddenRows
true to exclude the hidden rows when using the statistic; otherwise, false.
Example
The following code example shows how to customize the summary cell's calculation logic. This code example is part of a larger example provided for the SummaryCell class.
private SummaryCell CreateTotalSummaryCell()
        {
            // Calculate sum of subtotal in all rows.
            SummaryCell summaryCell = new SummaryCell();
            summaryCell.Name = "Total";
            summaryCell.Calculation = new MathStatistics(StatisticsType.Sum, "SubTotal", true);
            summaryCell.Style.Format = "C";
            summaryCell.Style.BackColor = Color.Wheat;
            return summaryCell;
        }
Private Function CreateTotalSummaryCell() As SummaryCell
        ' Calculate sum of subtotal in all rows.
        Dim summaryCell As New SummaryCell()
        summaryCell.Name = "Total"
        summaryCell.Calculation = New MathStatistics(StatisticsType.Sum, "SubTotal", True)
        summaryCell.Style.Format = "C"
        summaryCell.Style.BackColor = Color.Wheat
        Return summaryCell
    End Function
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

MathStatistics Class
MathStatistics Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.