Spread Windows Forms 10.0 Product Documentation
MaxDigits Property (NumberDecimalPartDisplayFieldInfo)
Example 


Gets or sets the maximize digits of the field.
Syntax
'Declaration
 
Public Property MaxDigits As Integer
'Usage
 
Dim instance As NumberDecimalPartDisplayFieldInfo
Dim value As Integer
 
instance.MaxDigits = value
 
value = instance.MaxDigits
public int MaxDigits {get; set;}

Property Value

An System.Int32 value indicates the maximize digits.
The default is 28.
Remarks
The property retrieves the maximum number of the digits.
Example
This example sets the display fields.
GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalPartDisplayFieldInfo ndp = new GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalPartDisplayFieldInfo();
ndp.MaxDigits = 3;
ndp.BackColor = Color.Orange; //PaintByControl must be true for appearance properties
GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalSeparatorDisplayFieldInfo ndecimal = new GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalSeparatorDisplayFieldInfo();
ndecimal.DecimalSeparator = Convert.ToChar("A");
GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberIntegerPartDisplayFieldInfo npart = new GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberIntegerPartDisplayFieldInfo();
npart.MinDigits = 3;
npart.BackColor = Color.Bisque;
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
ncell1.DropDownCalculator.FlatStyle = FlatStyle.Popup;
ncell1.DropDownCalculator.Font = new System.Drawing.Font("Comic Sans MS", 10);
ncell1.PaintByControl = true;
ncell1.DisplayFields.Add(ndp);
ncell1.DisplayFields.Add(ndecimal);
ncell1.DisplayFields.Add(npart);
fpSpread1.Sheets[0].Cells[1, 1].CellType = ncell1;
fpSpread1.ActiveSheet.Cells[1, 1].Value = 12.3189;
Dim ndp As New GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalPartDisplayFieldInfo()
ndp.MaxDigits = 3
ndp.BackColor = Color.Orange 'PaintByControl must be true for appearance properties
Dim ndecimal As New GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalSeparatorDisplayFieldInfo()
ndecimal.DecimalSeparator = Convert.ToChar("A")
Dim npart As New GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberIntegerPartDisplayFieldInfo()
npart.MinDigits = 3
npart.BackColor = Color.Bisque
Dim ncell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
ncell1.DropDownCalculator.FlatStyle = FlatStyle.Popup
ncell1.DropDownCalculator.Font = New System.Drawing.Font("Comic Sans MS", 10)
ncell1.PaintByControl = True
ncell1.DisplayFields.Add(ndp)
ncell1.DisplayFields.Add(ndecimal)
ncell1.DisplayFields.Add(npart)
FpSpread1.ActiveSheet.Cells(1, 1).CellType = ncell1
FpSpread1.ActiveSheet.Cells(1, 1).Value = 12.3189
Requirements

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

See Also

Reference

NumberDecimalPartDisplayFieldInfo Class
NumberDecimalPartDisplayFieldInfo Members

 

 


Copyright © GrapeCity, inc. All rights reserved.