Spread Windows Forms 10.0 Product Documentation
Pattern Property (NumberDecimalGeneralFormatDisplayFieldInfo)
Example 


Gets or sets the pattern of the field.
Syntax
'Declaration
 
Public Property Pattern As DecimalGeneralFormat
'Usage
 
Dim instance As NumberDecimalGeneralFormatDisplayFieldInfo
Dim value As DecimalGeneralFormat
 
instance.Pattern = value
 
value = instance.Pattern
public DecimalGeneralFormat Pattern {get; set;}

Property Value

A GrapeCity.Win.Spread.InputMan.CellType.DecimalGeneralFormat enumeration indicates the pattern of the field.
The default is GrapeCity.Win.Spread.InputMan.CellType.DecimalGeneralFormat.DBNum1_G.
Remarks
The property retrieves the display pattern of the NumberDecimalGeneralFormatDisplayField when the GrapeCity.Win.Spread.InputMan.CellType.GcNumber hasn't the input focus.
Example
This example sets a display format.
// DecimalGeneralFormat only works for ja-JP or zh-CN culture. It is similar to Excel.
GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalGeneralFormatDisplayFieldInfo numfield = new GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalGeneralFormatDisplayFieldInfo();
numfield.Pattern = GrapeCity.Win.Spread.InputMan.CellType.DecimalGeneralFormat.DBNum1_G;
numfield.BackColor = Color.Bisque;
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
ncell1.DisplayFields.Add(numfield);
ncell1.PaintByControl = true;
fpSpread1.Sheets[0].Cells[1, 1].CellType = ncell1;
fpSpread1.ActiveSheet.Cells[1, 1].Value = 12.31;
'DecimalGeneralFormat only works for ja-JP or zh-CN culture. It is similar to Excel.
Dim numfield As New GrapeCity.Win.Spread.InputMan.CellType.Fields.NumberDecimalGeneralFormatDisplayFieldInfo()
numfield.Pattern = GrapeCity.Win.Spread.InputMan.CellType.DecimalGeneralFormat.DBNum1_G
numfield.BackColor = Color.Bisque
Dim ncell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
ncell1.DisplayFields.Add(numfield)
ncell1.PaintByControl = True
FpSpread1.Sheets(0).Cells(1, 1).CellType = ncell1
FpSpread1.ActiveSheet.Cells(1, 1).Value = 12.31
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

NumberDecimalGeneralFormatDisplayFieldInfo Class
NumberDecimalGeneralFormatDisplayFieldInfo Members

 

 


Copyright © GrapeCity, inc. All rights reserved.