Spread for ASP.NET 7.0 Product Documentation
NumberFormat Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > GeneralCellType Class : NumberFormat Property


Glossary Item Box

Gets or sets a NumberFormatInfo which is used to format the numeric value, such as for currency.

Syntax

Visual Basic (Declaration) 
Public Overridable Property NumberFormat As NumberFormatInfo
Visual Basic (Usage)Copy Code
Dim instance As GeneralCellType
Dim value As NumberFormatInfo
 
instance.NumberFormat = value
 
value = instance.NumberFormat
C# 
public virtual NumberFormatInfo NumberFormat {get; set;}

Property Value

NumberFormatInfo object containing information for formatting numeric values

Example

C#Copy Code
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;
Visual BasicCopy Code
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

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.