Spread Windows Forms 11.0 Product Documentation
FractionConvertWholeNumbers Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > NumberCellType Class : FractionConvertWholeNumbers Property
Gets or sets whether to convert whole numbers to fractions when values are displayed as fractions.
Syntax
'Declaration
 
Public Overridable Property FractionConvertWholeNumbers As Boolean
'Usage
 
Dim instance As NumberCellType
Dim value As Boolean
 
instance.FractionConvertWholeNumbers = value
 
value = instance.FractionConvertWholeNumbers
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.
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;
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
See Also

Reference

NumberCellType Class
NumberCellType Members