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


Glossary Item Box

Gets or sets whether to convert whole numbers to fractions when values are displayed as fractions.

Syntax

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

Property Value

Boolean: true to convert whole numbers to fractions; false otherwise

Example

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

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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