Spread Windows Forms 6.0 Product Documentation
FractionMode Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > NumberCellType Class : FractionMode Property

Glossary Item Box

Gets or sets whether values are represented as fractions.


Visual Basic (Declaration) 
Public Overridable Property FractionMode As Boolean
Visual Basic (Usage)Copy Code
Dim instance As NumberCellType
Dim value As Boolean
instance.FractionMode = value
value = instance.FractionMode
public virtual bool FractionMode {get; set;}

Property Value

Boolean: true to display values as fractions; false otherwise


This example displays the value in the cell as a fraction.
C#Copy Code
FarPoint.Win.Spread.CellType.NumberCellType n = new FarPoint.Win.Spread.CellType.NumberCellType(); 
n.FractionMode = true; 
n.FractionConvertWholeNumbers = true; 
n.DecimalPlaces = 2; 
n.FractionDenominatorDigits = 2; 
n.FractionCustomFormat = "# ??/??"; 
n.FractionDenominatorPrecision = FarPoint.Win.Spread.CellType.FractionDenominatorPrecision.Hundredths; 
fpSpread1.ActiveSheet.Cells[0, 0].CellType = n; 
fpSpread1.ActiveSheet.Cells[0, 0].Value = 5.005;
Visual BasicCopy Code
Dim n As New FarPoint.Win.Spread.CellType.NumberCellType
n.FractionMode = True
n.FractionConvertWholeNumbers = True
n.DecimalPlaces = 2
n.FractionDenominatorDigits = 2
n.FractionCustomFormat = "# ??/??"
n.FractionDenominatorPrecision = FarPoint.Win.Spread.CellType.FractionDenominatorPrecision.Hundredths
FpSpread1.ActiveSheet.Cells(0, 0).CellType = n
FpSpread1.ActiveSheet.Cells(0, 0).Value = 5


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.