WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridNumericUpDownCellInfo

    Show / Hide Table of Contents

    Class GridNumericUpDownCellInfo

    Defines a class that provides a new StyleInfoSubObjectBase object for customization of NumericUpDown cells.

    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
    GridStyleInfoSubObject
    GridNumericUpDownCellInfo
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    IStyleInfo
    System.ComponentModel.ISupportInitialize
    System.IFormattable
    System.IConvertible
    System.Xml.Serialization.IXmlSerializable
    IStyleInfoSubObject
    Inherited Members
    GridStyleInfoSubObject.GetGridStyleInfo()
    GridStyleInfoSubObject.GetCellIdentity()
    GridStyleInfoSubObject.GetGridModel()
    GridStyleInfoSubObject.GetActiveGridView()
    GridStyleInfoSubObject.ToString()
    GridStyleInfoSubObject.Info
    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(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 GridNumericUpDownCellInfo : GridStyleInfoSubObject, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
    Examples

    The following code changes numeric up / down information for cells:

                model.TableStyle.NumericUpDown = new GridNumericUpDownCellInfo(0, 25, 1, 1, true);
                model[rowIndex, 1].Text = "NumericUpDown";
                // Wrapping, Range 0-1000
                model[rowIndex, 3].CellType = "NumericUpDown";
                model[rowIndex, 3].NumericUpDown = new GridNumericUpDownCellInfo(0, 1000, 0, 1, true);
                // Disabled
                model[rowIndex, 4].CellType = "NumericUpDown";
                model[rowIndex, 4].Enabled = false;
                model[rowIndex, 4].Text = "5";
                // No wrapping, Range 1-20
                model[rowIndex, 5].CellType = "NumericUpDown";
                model[rowIndex, 5].NumericUpDown = new GridNumericUpDownCellInfo(1, 20, 1, 1, false);
                rowIndex++;

    Constructors

    GridNumericUpDownCellInfo()

    Initializes a new instances of the GridNumericUpDownCellInfo class.

    Declaration
    public GridNumericUpDownCellInfo()

    GridNumericUpDownCellInfo(StyleInfoSubObjectIdentity)

    Initializes a new instances of the GridNumericUpDownCellInfo class that associates with an existing GridStyleInfoSubObjectIdentity.

    Declaration
    public GridNumericUpDownCellInfo(StyleInfoSubObjectIdentity identity)
    Parameters
    Type Name Description
    StyleInfoSubObjectIdentity identity

    A GridStyleInfoSubObjectIdentity that holds the identity for this GridNumericUpDownCellInfo.

    GridNumericUpDownCellInfo(StyleInfoSubObjectIdentity, GridNumericUpDownCellInfoStore)

    Initializes a new instances of the GridNumericUpDownCellInfo class associates it with an existing GridStyleInfoSubObjectIdentity and GridNumericUpDownCellInfo.

    Declaration
    public GridNumericUpDownCellInfo(StyleInfoSubObjectIdentity identity, GridNumericUpDownCellInfoStore store)
    Parameters
    Type Name Description
    StyleInfoSubObjectIdentity identity

    A GridStyleInfoSubObjectIdentity that holds the identity for this GridNumericUpDownCellInfo.

    GridNumericUpDownCellInfoStore store

    A GridNumericUpDownCellInfoStore that holds data for this GridNumericUpDownCellInfo. All changes in this style object will be saved in the GridNumericUpDownCellInfoStore object.

    GridNumericUpDownCellInfo(Int32, Int32, Int32, Int32, Boolean)

    Initializes a new instances of the GridNumericUpDownCellInfo class specified with the numeric up / down information.

    Declaration
    public GridNumericUpDownCellInfo(int min, int max, int start, int num, bool wrap)
    Parameters
    Type Name Description
    System.Int32 min

    Minimum value.

    System.Int32 max

    Maximum value.

    System.Int32 start

    Start value. This is the first value when you press up or down in an empty cell.

    System.Int32 num

    The step to increase or decrease when clicking up or down buttons.

    System.Boolean wrap

    IfTrueValues should start over when the value reaches maximum or minimum.

    Examples

    This example shows how to use the GridNumericUpDownCellInfo(Int32, Int32, Int32, Int32, Boolean) method.

    this.gridControl1.TableStyle.NumericUpDown = new GridNumericUpDownCellInfo(0, 1000, 5, 5, false);
    Me.gridControl1.TableStyle.NumericUpDown = New GridNumericUpDownCellInfo(0, 1000, 5, 5, False)

    Properties

    ArrowColor

    Gets or sets the arrow fore color of Up and Down buttons.

    Declaration
    public Color ArrowColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    BackColor

    Gets or sets the background color of Up and Down buttons in normal state.

    Declaration
    public Color BackColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    BorderColor

    Gets or sets the border color of Up and Down buttons in normal state.

    Declaration
    public Color BorderColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    Default

    Gets the default value GridNumericUpDownCellInfo to be used with a default style.

    Declaration
    public static GridNumericUpDownCellInfo Default { get; }
    Property Value
    Type Description
    GridNumericUpDownCellInfo
    Remarks

    The Default of the GridStyleInfo class will return the default numeric up / down info that this method generates through its overridden version of GetDefaultStyle().

    Default settings are:

    PropertyValue
    Minimum0
    Maximumint.MaxValue
    WrapValuefalse
    Step1
    StartValue0

    HasMaximum

    Gets a value indicating whether Maximum property is initialized.

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

    HasMinimum

    Gets a value indicating whether the Minimum property is initialized.

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

    HasStartValue

    Gets a value indicating whether StartValue property is initialized.

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

    HasStep

    Gets a value indicating whether the Step property is initialized.

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

    HasWrapValue

    Gets a value indicating whether WrapValue property is initialized.

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

    HoverBackColor

    Gets or sets the background color of Up and Down buttons in hover state.

    Declaration
    public Color HoverBackColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    HoverBorderColor

    Gets or sets the border color of Up and Down buttons in hover state.

    Declaration
    public Color HoverBorderColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    Maximum

    Gets or sets the maximum value.

    Declaration
    public int Maximum { get; set; }
    Property Value
    Type Description
    System.Int32

    Minimum

    Gets or sets the minimum value.

    Declaration
    public int Minimum { get; set; }
    Property Value
    Type Description
    System.Int32

    PressedBackColor

    Gets or sets the background color of Up and Down buttons in pressed state.

    Declaration
    public Color PressedBackColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    PressedBorderColor

    Gets or sets the border color of Up and Down buttons in pressed state.

    Declaration
    public Color PressedBorderColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    StartValue

    Gets or sets the start value. This is the first value when you press up or down in an empty cell.

    Declaration
    public int StartValue { get; set; }
    Property Value
    Type Description
    System.Int32

    Step

    Gets or sets the step value to increase or decrease when clicking up or down buttons.

    Declaration
    public int Step { get; set; }
    Property Value
    Type Description
    System.Int32

    WrapValue

    Gets or sets a value indicating whether to wrap or not. True if value should be starting over when value reaches maximum or minimum.

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

    IfTrueThe values should starts over when it reaches the maximum or minimum value.

    Methods

    GetDefaultStyle()

    Overrides and gets the default style object for your derived class.

    Declaration
    protected override StyleInfoBase GetDefaultStyle()
    Returns
    Type Description
    StyleInfoBase

    A default style object.

    Overrides
    StyleInfoBase.GetDefaultStyle()

    MakeCopy(StyleInfoBase, StyleInfoProperty)

    Overrides and creates 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

    An identifier for this object.

    Returns
    Type Description
    IStyleInfoSubObject

    Copied object.

    Overrides
    StyleInfoSubObjectBase.MakeCopy(StyleInfoBase, StyleInfoProperty)

    ResetMaximum()

    Resets the Maximum property.

    Declaration
    public void ResetMaximum()

    ResetMinimum()

    Resets the Minimum property.

    Declaration
    public void ResetMinimum()

    ResetStartValue()

    Resets the StartValue property.

    Declaration
    public void ResetStartValue()

    ResetStep()

    Resets the Step property.

    Declaration
    public void ResetStep()

    ResetWrapValue()

    Resets the WrapValue property.

    Declaration
    public void ResetWrapValue()

    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 - 2023 Syncfusion Inc. All Rights Reserved