Spread Windows Forms 8.0 Product Documentation
NegativeRed Property (GeneralCellType)
Example 


Gets or sets whether negative values are displayed in red.
Syntax
'Declaration
 
Public Property NegativeRed As Boolean
'Usage
 
Dim instance As GeneralCellType
Dim value As Boolean
 
instance.NegativeRed = value
 
value = instance.NegativeRed
public bool NegativeRed {get; set;}

Property Value

Boolean: true to display negative values in red; false otherwise
Example
This example specifies a NumberFormatInfo which is used to format a currency value.
FarPoint.Win.Spread.CellType.GeneralCellType genlcell = new FarPoint.Win.Spread.CellType.GeneralCellType();
System.Globalization.NumberFormatInfo numform = (System.Globalization.NumberFormatInfo)System.Globalization.NumberFormatInfo.CurrentInfo.Clone();
numform.CurrencySymbol = "\xA3";   
Decimal myCurrency = new Decimal( 123456 );
genlcell.NumberFormat = numform;
genlcell.NegativeRed = true;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = genlcell;
fpSpread1.ActiveSheet.Cells[0, 0].Value = myCurrency.ToString( "C", numform );
Dim genlcell As New FarPoint.Win.Spread.CellType.GeneralCellType()
Dim numform As System.Globalization.NumberFormatInfo = CType(System.Globalization.NumberFormatInfo.CurrentInfo.Clone(), System.Globalization.NumberFormatInfo)
numform.CurrencySymbol = Chr(163)
Dim myCurrency As New (Decimal)(123456)
genlcell.NumberFormat = numform
genlcell.NegativeRed = True
FpSpread1.ActiveSheet.Cells(0, 0).CellType = g
FpSpread1.ActiveSheet.Cells(0, 0).Value = myCurrency.ToString("C", numform)
Requirements

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

See Also

Reference

GeneralCellType Class
GeneralCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.