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


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

Property Value

NumberFormatInfo object containing information for formatting numeric values
Example
FarPoint.Web.Spread.GeneralCellType g = new FarPoint.Web.Spread.GeneralCellType();
System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
nfi.NumberDecimalDigits = 3;
nfi.NumberDecimalSeparator = ",";
g.NumberFormat = nfi;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = g;
FpSpread1.ActiveSheetView.Cells[0, 0].Value = 234.56;
Dim g As New FarPoint.Web.Spread.GeneralCellType
Dim nfi As New System.Globalization.NumberFormatInfo
nfi.NumberDecimalDigits = 3
nfi.NumberDecimalSeparator = ","
g.NumberFormat = nfi
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = g
FpSpread1.ActiveSheetView.Cells(0, 0).Value = 234.56
See Also

Reference

GeneralCellType Class
GeneralCellType Members