Spread for ASP.NET 11 Product Documentation
NumberFormat Property (CurrencyCellType)
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > CurrencyCellType Class : NumberFormat Property
Gets or sets a NumberFormatInfo which is used to format the numeric value, such as for currency.
Syntax
'Declaration
 
Public Overrides Property NumberFormat As NumberFormatInfo
'Usage
 
Dim instance As CurrencyCellType
Dim value As NumberFormatInfo
 
instance.NumberFormat = value
 
value = instance.NumberFormat
public override NumberFormatInfo NumberFormat {get; set;}

Property Value

NumberFormatInfo object containing the format information for the number
Example
This sets the formatting for the celltype.
FarPoint.Web.Spread.CurrencyCellType c = new FarPoint.Web.Spread.CurrencyCellType(); 
System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo(); 
nfi.NumberDecimalDigits = 3; 
nfi.NumberDecimalSeparator = ","; 
nfi.CurrencySymbol = "$";
c.NumberFormat = nfi; 
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = c; 
FpSpread1.ActiveSheetView.Cells[0, 0].Value = 234.56;
Dim c As New FarPoint.Web.Spread.CurrencyCellType
Dim nfi As New System.Globalization.NumberFormatInfo
nfi.NumberDecimalDigits = 3
nfi.NumberDecimalSeparator = ","
nfi.CurrencySymbol = "$"
c.NumberFormat = nfi
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = c
FpSpread1.ActiveSheetView.Cells(0, 0).Value = 234.56
See Also

Reference

CurrencyCellType Class
CurrencyCellType Members