Spread Windows Forms 6.0 Product Documentation
LeadingZero Enumeration
Example  See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace : LeadingZero Enumeration

Glossary Item Box

Specifies whether to display leading zeros in numeric cell types.


Visual Basic (Declaration) 
Public Enum LeadingZero 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As LeadingZero
public enum LeadingZero : System.Enum 


NoDoes not display leading zeros
UseRegionalDisplays leading zeros according to the Windows regional settings
YesDisplays leading zeros


Do not use the UseRegional setting: it is intended for future use to display leading zeros according to the Windows regional settings, but this setting is not implemented at this time.

For those properties that use this setting as a default, the default value is instead 1 (No), which specifies that no leading zero is displayed.


This example shows how to display the leading zero in a numeric cell.
C#Copy Code
FarPoint.Win.Spread.CellType.NumberCellType numct = new FarPoint.Win.Spread.CellType.NumberCellType();
numct.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = numct;
fpSpread1.ActiveSheet.Cells[0, 0].Value = 0.456;
Visual BasicCopy Code
Dim numct As New FarPoint.Win.Spread.CellType.NumberCellType()
numct.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes
FpSpread1.ActiveSheet.Cells(0, 0).CellType = numct
FpSpread1.ActiveSheet.Cells(0, 0).Value = 0.456

Inheritance Hierarchy



Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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