GrapeCity.Win.MultiRow Namespace > SummaryCell Class : Calculation Property |
<SRDescriptionAttribute("Indicates how to calculate the SummaryCell's value.")> <TypeConverterAttribute("GrapeCity.Win.MultiRow.CalculationTypeConverter, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <MergablePropertyAttribute(False)> <DefaultValueAttribute()> <RefreshPropertiesAttribute(RefreshProperties.All)> <SRCategoryAttribute("Data")> <EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.CalculationEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> Public Property Calculation As ICalculation
Dim instance As SummaryCell Dim value As ICalculation instance.Calculation = value value = instance.Calculation
[SRDescription("Indicates how to calculate the SummaryCell's value.")] [TypeConverter("GrapeCity.Win.MultiRow.CalculationTypeConverter, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [MergableProperty(false)] [DefaultValue()] [RefreshProperties(RefreshProperties.All)] [SRCategory("Data")] [Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="GrapeCity.Win.MultiRow.Design.CalculationEditor, GrapeCity.Win.MultiRow, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] public ICalculation Calculation {get; set;}
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
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