GrapeCity MultiRow Windows Forms Documentation
Expression Constructor(String)
Example 


The expression string.
Initializes a new instance of the Expression class with the specified expression.
Syntax
Public Function New( _
   ByVal expression As String _
)
Dim expression As String
 
Dim instance As New Expression(expression)
public Expression( 
   string expression
)

Parameters

expression
The expression string.
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 CreateSubTotalSummaryCell()
        {
            // Calculates the subtotal based on 'Price' and 'Count' in the same row.
            SummaryCell summaryCell = new SummaryCell();
            summaryCell.Name = "SubTotal";
            summaryCell.Calculation = new Expression("Price * Count");
            summaryCell.Style.Format = "C";
            summaryCell.Style.BackColor = Color.Wheat;
            return summaryCell;
        }
Private Function CreateSubTotalSummaryCell() As SummaryCell
        ' Calculates the subtotal based on 'Price' and 'Count' in the same row.
        Dim summaryCell As New SummaryCell()
        summaryCell.Name = "SubTotal"
        summaryCell.Calculation = New Expression("Price * Count")
        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

Expression Class
Expression Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.