WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCurrencyEditInfo - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    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
    System.Object
    ShouldSerializeBasedPersisterType
    StyleInfoBase
    StyleInfoSubObjectBase
    GridCurrencyEditInfo
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Inherited Members
    StyleInfoSubObjectBase.Dispose(Boolean)
    StyleInfoSubObjectBase.OnStyleChanged(StyleInfoProperty)
    StyleInfoSubObjectBase.IntGetDefaultStyleInfo(StyleInfoProperty)
    StyleInfoSubObjectBase.SubObjectIdentity
    StyleInfoSubObjectBase.Sip
    StyleInfoSubObjectBase.Data
    StyleInfoSubObjectBase.Owner
    StyleInfoBase.WriteXml(XmlWriter)
    StyleInfoBase.ReadXml(XmlReader)
    StyleInfoBase.SetStore(StyleInfoStore)
    StyleInfoBase.ClearCache()
    StyleInfoBase.Dispose()
    StyleInfoBase.Equals(Object)
    StyleInfoBase.EqualsObject(Object, Object)
    StyleInfoBase.GetHashCode()
    StyleInfoBase.ToString()
    StyleInfoBase.ToString(String)
    StyleInfoBase.ToString(String, IFormatProvider)
    StyleInfoBase.ParseString(String)
    StyleInfoBase.BeginInit()
    StyleInfoBase.EndInit()
    StyleInfoBase.BeginUpdate()
    StyleInfoBase.EndUpdate()
    StyleInfoBase.CreateSubObjectIdentity(StyleInfoProperty)
    StyleInfoBase.GetDefaultStyleInfoStore(StyleInfoProperty)
    StyleInfoBase.OnStyleChanging(StyleInfoProperty)
    StyleInfoBase.IsSubset(IStyleInfo)
    StyleInfoBase.CopyFrom(IStyleInfo)
    StyleInfoBase.ModifyStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.InheritStyle(IStyleInfo, StyleModifyType)
    StyleInfoBase.MergeStyle(IStyleInfo)
    StyleInfoBase.HasValue(StyleInfoProperty)
    StyleInfoBase.IsValueModified(StyleInfoProperty)
    StyleInfoBase.ResetValue(StyleInfoProperty)
    StyleInfoBase.GetValue(StyleInfoProperty)
    StyleInfoBase.GetDefaultValue(StyleInfoProperty)
    StyleInfoBase.GetShortValue(StyleInfoProperty)
    StyleInfoBase.SetValue(StyleInfoProperty, Object)
    StyleInfoBase.SetValue(StyleInfoProperty, Int16)
    StyleInfoBase.IConvertible.ToUInt64(IFormatProvider)
    StyleInfoBase.IConvertible.ToSByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToDouble(IFormatProvider)
    StyleInfoBase.IConvertible.ToDateTime(IFormatProvider)
    StyleInfoBase.IConvertible.ToSingle(IFormatProvider)
    StyleInfoBase.IConvertible.ToBoolean(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt32(IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt16(IFormatProvider)
    StyleInfoBase.IConvertible.ToString(IFormatProvider)
    StyleInfoBase.IConvertible.ToByte(IFormatProvider)
    StyleInfoBase.IConvertible.ToChar(IFormatProvider)
    StyleInfoBase.IConvertible.ToInt64(IFormatProvider)
    StyleInfoBase.IConvertible.GetTypeCode()
    StyleInfoBase.IConvertible.ToDecimal(IFormatProvider)
    StyleInfoBase.IConvertible.ToType(Type, IFormatProvider)
    StyleInfoBase.IConvertible.ToUInt32(IFormatProvider)
    StyleInfoBase.Identity
    StyleInfoBase.Store
    StyleInfoBase.CacheValues
    StyleInfoBase.WeakReferenceChangedListeners
    StyleInfoBase.Updating
    StyleInfoBase.IsEmpty
    StyleInfoBase.IsChanged
    StyleInfoBase.Changed
    StyleInfoBase.Changing
    ShouldSerializeBasedPersisterType.GetNewAttributesCount(PropertyDescriptor)
    ShouldSerializeBasedPersisterType.AddNewAttributes(PropertyDescriptor, Attribute[], Int32)
    ShouldSerializeBasedPersisterType.GetCustomPDC(PropertyDescriptorCollection)
    ShouldSerializeBasedPersisterType.CheckAllProperties
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    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:

    PropertyValue
    UseCultureInfofalse
    CurrencyDecimalDigits2
    NegativeSign"-"
    CurrencyDecimalSeparator"."
    CurrencyGroupSeparator","
    CurrencyGroupSizes
    CurrencyNegativePattern0
    CurrencyPositivePattern0
    CurrencySymbol"$"
    CurrencyNumberDigits27
    NegativeColorRed
    PositiveColorBlack
    ClipModeExcludeFormatting
    NullString"0"

    HasClipMode

    Gets a value indicating whether ClipMode property is initialized.

    Declaration
    public bool HasClipMode { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyDecimalDigits

    Gets a value indicating whether CurrencyDecimalDigits property is initialized.

    Declaration
    public bool HasCurrencyDecimalDigits { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyDecimalSeparator

    Gets a value indicating whether CurrencyDecimalSeparator property is initialized.

    Declaration
    public bool HasCurrencyDecimalSeparator { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyGroupSeparator

    Gets a value indicating whether CurrencyGroupSeparator property is initialized.

    Declaration
    public bool HasCurrencyGroupSeparator { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyGroupSizes

    Gets a value indicating whether CurrencyGroupSizes property is initialized.

    Declaration
    public bool HasCurrencyGroupSizes { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyNegativePattern

    Gets a value indicating whether CurrencyNegativePattern property is initialized.

    Declaration
    public bool HasCurrencyNegativePattern { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyNumberDigits

    Gets a value indicating whether CurrencyNumberDigits property is initialized.

    Declaration
    public bool HasCurrencyNumberDigits { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencyPositivePattern

    Gets a value indicating whether CurrencyPositivePattern property is initialized.

    Declaration
    public bool HasCurrencyPositivePattern { get; }
    Property Value
    Type Description
    System.Boolean

    HasCurrencySymbol

    Gets a value indicating whether CurrencySymbol property is initialized.

    Declaration
    public bool HasCurrencySymbol { get; }
    Property Value
    Type Description
    System.Boolean

    HasNegativeColor

    Gets a value indicating whether NegativeColor property is initialized.

    Declaration
    public bool HasNegativeColor { get; }
    Property Value
    Type Description
    System.Boolean

    HasNegativeSign

    Gets a value indicating whether NegativeSign property is initialized.

    Declaration
    public bool HasNegativeSign { get; }
    Property Value
    Type Description
    System.Boolean

    HasNullString

    Gets a value indicating whether NullString property is initialized.

    Declaration
    public bool HasNullString { get; }
    Property Value
    Type Description
    System.Boolean

    HasNullValue

    Gets a value indicating whether NullValue property is initialized.

    Declaration
    public bool HasNullValue { get; }
    Property Value
    Type Description
    System.Boolean

    HasPositiveColor

    Gets a value indicating whether PositiveColor property is initialized.

    Declaration
    public bool HasPositiveColor { get; }
    Property Value
    Type Description
    System.Boolean

    HasUseCultureInfo

    Gets a value indicating whether UseCultureInfo property is initialized.

    Declaration
    public bool HasUseCultureInfo { get; }
    Property Value
    Type Description
    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 Description
    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 Description
    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 Description
    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 Description
    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 Description
    System.Globalization.NumberFormatInfo
    Remarks

    This property will affect or reflect the settings of the following properties in this object:

    PropertyDefault Value
    CurrencyDecimalDigits2
    NegativeSign"-"
    CurrencyDecimalSeparator"."
    CurrencyGroupSeparator","
    CurrencyGroupSizes
    CurrencyNegativePattern0
    CurrencyPositivePattern0
    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 Description
    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 Description
    System.Boolean

    Methods

    GetDefaultStyle()

    Returns Default

    Declaration
    protected override StyleInfoBase GetDefaultStyle()
    Returns
    Type Description
    StyleInfoBase

    A GridCurrencyEditInfo object with default values.

    Overrides
    StyleInfoBase.GetDefaultStyle()

    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
    StyleInfoSubObjectBase.MakeCopy(StyleInfoBase, StyleInfoProperty)

    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()

    Implements

    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved