Spread Windows Forms 9.0 Product Documentation
NegativeFormat Property (CurrencyCellType)
Example 


Gets or sets the format for displaying a negative value.
Syntax
'Declaration
 
Public Property NegativeFormat As CurrencyNegativeFormat
'Usage
 
Dim instance As CurrencyCellType
Dim value As CurrencyNegativeFormat
 
instance.NegativeFormat = value
 
value = instance.NegativeFormat
public CurrencyNegativeFormat NegativeFormat {get; set;}

Property Value

CurrencyNegativeFormat setting that determines how negative currency values are displayed
Example
This example specifies a currency cell and sets the formatting using the various properties.
FarPoint.Win.Spread.CellType.CurrencyCellType currcell = new FarPoint.Win.Spread.CellType.CurrencyCellType();
currcell.CurrencySymbol = "CN$";
currcell.DecimalPlaces = 4;
currcell.DecimalSeparator = "#";
currcell.FixedPoint = true;
currcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
currcell.MaximumValue = 999999999999;
currcell.MinimumValue = 1;
currcell.NegativeFormat = FarPoint.Win.Spread.CellType.CurrencyNegativeFormat.SignSymbolSpaceBefore;
currcell.NegativeRed = true;
currcell.PositiveFormat = FarPoint.Win.Spread.CellType.CurrencyPositiveFormat.CurrencySymbolBefore;
currcell.Separator = ",";
currcell.ShowCurrencySymbol = true;
currcell.ShowSeparator = true;
fpSpread1.Sheets[0].Cells[5,2].CellType = currcell;
fpSpread1.Sheets[0].Cells[5,2].Value = 321.98;
Dim currcell As New FarPoint.Win.Spread.CellType.CurrencyCellType()
currcell.CurrencySymbol = "CN$"
currcell.DecimalPlaces = 4
currcell.DecimalSeparator = "#"
currcell.FixedPoint = True
currcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes
currcell.MaximumValue = 999999999999
currcell.MinimumValue = 1
currcell.NegativeFormat = FarPoint.Win.Spread.CellType.CurrencyNegativeFormat.SignSymbolSpaceBefore
currcell.NegativeRed = true
currcell.PositiveFormat = FarPoint.Win.Spread.CellType.CurrencyPositiveFormat.CurrencySymbolBefore
currcell.Separator = ","
currcell.ShowCurrencySymbol = True
currcell.ShowSeparator = True
FpSpread1.Sheets(0).Cells(5, 2).CellType = currcell
FpSpread1.Sheets(0).Cells(5, 2).Value = 443.3482
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

CurrencyCellType Class
CurrencyCellType Members
CurrencyNegativeFormat Enum

 

 


Copyright © GrapeCity, inc. All rights reserved.