Class GridCurrencyEditInfo
Implements the functionalities that provides a StyleInfoSubObjectBase object for currency textbox properties in a cell.
Each property in this sub object can be configured individually. Properties that have not been initialized will inherit default values from a base style.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridCurrencyEditInfo : StyleInfoSubObjectBase, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Constructors
GridCurrencyEditInfo()
Initializes a new empty instance ofGridCurrencyEditInfo class.
Declaration
public GridCurrencyEditInfo()
GridCurrencyEditInfo(StyleInfoSubObjectIdentity)
Initalizes a new instance ofGridCurrencyEditInfo object and associates it with an existing GridStyleInfoSubObjectIdentity.
Declaration
public GridCurrencyEditInfo(StyleInfoSubObjectIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the identity for this GridCurrencyEditInfo. |
GridCurrencyEditInfo(StyleInfoSubObjectIdentity, GridCurrencyEditInfoStore)
Initalizes a new instance ofGridCurrencyEditInfo object and associates it with an existing GridStyleInfoSubObjectIdentity.
Declaration
public GridCurrencyEditInfo(StyleInfoSubObjectIdentity identity, GridCurrencyEditInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the identity for this GridCurrencyEditInfo. |
GridCurrencyEditInfoStore | store | A GridCurrencyEditInfoStore that holds data for this GridCurrencyEditInfo. All changes in this style object will saved in the GridCurrencyEditInfoStore object. |
Properties
ClipMode
Gets or sets whether to include or exclude the literal characters in the input mask when doing a or copy command.
Declaration
public CurrencyClipModes ClipMode { get; set; }
Property Value
Type |
---|
CurrencyClipModes |
Remarks
This property is used when copying to the clipboard and also the System.Windows.Forms.Control.Text property.
When databinding the Text property it is advisable to have the ClipMode set to ExcludeFormatting in cases where the data source does not accept the formatted text.
CurrencyDecimalDigits
Gets or sets the maximum number of digits for the decimal portion of the currency.
Declaration
public int CurrencyDecimalDigits { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
The US dollar requires 2 decimal points to accommodate the smallest denomination and this property will have the value 2 in this case.
CurrencyDecimalSeparator
Gets or sets the decimal separator character that will be used for the display.
Declaration
public string CurrencyDecimalSeparator { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
CurrencyGroupSeparator
Gets or sets this property specifies the separator to be used for grouping digits.
Declaration
public string CurrencyGroupSeparator { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
CurrencyGroupSizes
Gets or sets this property specifies the grouping of CurrencyDigits in the CurrencyTextBox.
Declaration
public int[] CurrencyGroupSizes { get; set; }
Property Value
Type |
---|
System.Int32[] |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
CurrencyNegativePattern
Gets or sets this property specifies the pattern to use when the value is negative.
Declaration
public int CurrencyNegativePattern { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
CurrencyNumberDigits
Gets or sets the number of digits for the number part. This is not part of the globalization structure.
Declaration
public int CurrencyNumberDigits { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
This value is initially set based on the maximum value of the Currency data type.
CurrencyPositivePattern
Gets or sets this property specifies the pattern to use when the value is positive.
Declaration
public int CurrencyPositivePattern { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
CurrencySymbol
Gets or sets this property specifies the currency symbol to be used in the CurrencyTextBox.
Declaration
public string CurrencySymbol { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
Examples
This example shows how to use the CurrencySymbol property.
//Default currency symbol "$".
this.gridControl1.TableStyle.CurrencyEdit.CurrencySymbol = "�";
'Default currency symbol "$".
Me.gridControl1.TableStyle.CurrencyEdit.CurrencySymbol = "�"
Default
Gets a default GridCurrencyEditInfo to be used with a default style.
Declaration
public static GridCurrencyEditInfo Default { get; }
Property Value
Type |
---|
GridCurrencyEditInfo |
Remarks
The Default of the GridStyleInfo class will return the validation info that this method generates through its overridden version of GetDefaultStyle().
Default settings for US culture are:
Property | Value |
---|---|
UseCultureInfo | false |
CurrencyDecimalDigits | 2 |
NegativeSign | "-" |
CurrencyDecimalSeparator | "." |
CurrencyGroupSeparator | "," |
CurrencyGroupSizes | |
CurrencyNegativePattern | 0 |
CurrencyPositivePattern | 0 |
CurrencySymbol | "$" |
CurrencyNumberDigits | 27 |
NegativeColor | Red |
PositiveColor | Black |
ClipMode | ExcludeFormatting |
NullString | "0" |
HasClipMode
Gets a value indicating whether ClipMode property is initialized.
Declaration
public bool HasClipMode { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyDecimalDigits
Gets a value indicating whether CurrencyDecimalDigits property is initialized.
Declaration
public bool HasCurrencyDecimalDigits { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyDecimalSeparator
Gets a value indicating whether CurrencyDecimalSeparator property is initialized.
Declaration
public bool HasCurrencyDecimalSeparator { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyGroupSeparator
Gets a value indicating whether CurrencyGroupSeparator property is initialized.
Declaration
public bool HasCurrencyGroupSeparator { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyGroupSizes
Gets a value indicating whether CurrencyGroupSizes property is initialized.
Declaration
public bool HasCurrencyGroupSizes { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyNegativePattern
Gets a value indicating whether CurrencyNegativePattern property is initialized.
Declaration
public bool HasCurrencyNegativePattern { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyNumberDigits
Gets a value indicating whether CurrencyNumberDigits property is initialized.
Declaration
public bool HasCurrencyNumberDigits { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencyPositivePattern
Gets a value indicating whether CurrencyPositivePattern property is initialized.
Declaration
public bool HasCurrencyPositivePattern { get; }
Property Value
Type |
---|
System.Boolean |
HasCurrencySymbol
Gets a value indicating whether CurrencySymbol property is initialized.
Declaration
public bool HasCurrencySymbol { get; }
Property Value
Type |
---|
System.Boolean |
HasNegativeColor
Gets a value indicating whether NegativeColor property is initialized.
Declaration
public bool HasNegativeColor { get; }
Property Value
Type |
---|
System.Boolean |
HasNegativeSign
Gets a value indicating whether NegativeSign property is initialized.
Declaration
public bool HasNegativeSign { get; }
Property Value
Type |
---|
System.Boolean |
HasNullString
Gets a value indicating whether NullString property is initialized.
Declaration
public bool HasNullString { get; }
Property Value
Type |
---|
System.Boolean |
HasNullValue
Gets a value indicating whether NullValue property is initialized.
Declaration
public bool HasNullValue { get; }
Property Value
Type |
---|
System.Boolean |
HasPositiveColor
Gets a value indicating whether PositiveColor property is initialized.
Declaration
public bool HasPositiveColor { get; }
Property Value
Type |
---|
System.Boolean |
HasUseCultureInfo
Gets a value indicating whether UseCultureInfo property is initialized.
Declaration
public bool HasUseCultureInfo { get; }
Property Value
Type |
---|
System.Boolean |
NegativeColor
Gets or sets this property specifies the fore color when the current value is negative.
Declaration
public Color NegativeColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
You can customize the look and provide feedback to the user by defining a different color for the negative numbers.
Examples
This example shows how to use NegativeColor property.
this.gridControl1.TableStyle.CurrencyEdit.NegativeColor = Color.Red;
this.gridControl1.TableStyle.CurrencyEdit.NegativeColor = Color.Red;
NegativeSign
Gets or sets the sign that is to be used to indicate a negative value.
Declaration
public string NegativeSign { get; set; }
Property Value
Type |
---|
System.String |
Remarks
This value is initially set from the System.Globalization.NumberFormatInfo and can be changed based on your requirements or based on the locale.
NullString
Gets or sets the null string to be displayed
Declaration
public string NullString { get; set; }
Property Value
Type |
---|
System.String |
NullValue
Gets or sets the value to be saved when the modified display text matches the null string.
Declaration
public object NullValue { get; set; }
Property Value
Type |
---|
System.Object |
NumberFormatInfoObject
Gets or sets the NumberFormaInfo object that will be used for formatting the currency string.
Declaration
public NumberFormatInfo NumberFormatInfoObject { get; set; }
Property Value
Type |
---|
System.Globalization.NumberFormatInfo |
Remarks
This property will affect or reflect the settings of the following properties in this object:
Property | Default Value |
---|---|
CurrencyDecimalDigits | 2 |
NegativeSign | "-" |
CurrencyDecimalSeparator | "." |
CurrencyGroupSeparator | "," |
CurrencyGroupSizes | |
CurrencyNegativePattern | 0 |
CurrencyPositivePattern | 0 |
CurrencySymbol | "$" |
PositiveColor
Gets or sets this property specifies the forecolor when the current value is positive.
Declaration
public Color PositiveColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
You can customize the look and provide feedback to the user by defining a different color for the positive numbers.
UseCultureInfo
Gets or sets a value indicating whether NumberFormat should be based on Grid's Style or individual properties of this object true if System.Globalization.NumberFormatInfo should be based on CultureInfo; false if System.Globalization.NumberFormatInfo should be based on individual properties of this object.
Declaration
public bool UseCultureInfo { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
GetDefaultStyle()
Returns Default
Declaration
protected override StyleInfoBase GetDefaultStyle()
Returns
Type | Description |
---|---|
StyleInfoBase | A GridCurrencyEditInfo object with default values. |
Overrides
MakeCopy(StyleInfoBase, StyleInfoProperty)
Makes an exact copy of the current object.
Declaration
public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoBase | newOwner | The new owner style object for the copied object. |
StyleInfoProperty | sip | The identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | Copy of current object. |
Overrides
ResetClipMode()
Resets the ClipMode property.
Declaration
public void ResetClipMode()
ResetCurrencyDecimalDigits()
Resets the CurrencyDecimalDigits property.
Declaration
public void ResetCurrencyDecimalDigits()
ResetCurrencyDecimalSeparator()
Resets the CurrencyDecimalSeparator property.
Declaration
public void ResetCurrencyDecimalSeparator()
ResetCurrencyGroupSeparator()
Resets the CurrencyGroupSeparator property.
Declaration
public void ResetCurrencyGroupSeparator()
ResetCurrencyGroupSizes()
Resets the CurrencyGroupSizes property.
Declaration
public void ResetCurrencyGroupSizes()
ResetCurrencyNegativePattern()
Resets the CurrencyNegativePattern property.
Declaration
public void ResetCurrencyNegativePattern()
ResetCurrencyNumberDigits()
Resets the CurrencyNumberDigits property.
Declaration
public void ResetCurrencyNumberDigits()
ResetCurrencyPositivePattern()
Resets the CurrencyPositivePattern property.
Declaration
public void ResetCurrencyPositivePattern()
ResetCurrencySymbol()
Resets the CurrencySymbol property.
Declaration
public void ResetCurrencySymbol()
ResetNegativeColor()
Resets the NegativeColor property.
Declaration
public void ResetNegativeColor()
ResetNegativeSign()
Resets the NegativeSign property.
Declaration
public void ResetNegativeSign()
ResetNullString()
Resets the NullString property.
Declaration
public void ResetNullString()
ResetNullValue()
Resets the NullValue property.
Declaration
public void ResetNullValue()
ResetPositiveColor()
Resets the PositiveColor property.
Declaration
public void ResetPositiveColor()
ResetUseCultureInfo()
Resets the UseCultureInfo property.
Declaration
public void ResetUseCultureInfo()