ASPxSpinEdit

  • 3 minutes to read

The ASPxSpinEdit control allows users to use a spin button, a mouse wheel, or keyboard keys to increment and decrement numeric edit values.

ASPxSpinEdit_control.png

ASPxSpinEdit offers the following features.

  • Customizable Button Visibility and Position

    Use the SpinButtons.ShowIncrementButtons and SpinButtons.ShowLargeIncrementButtons properties to control spin button visibility. To define the position of a spin button within the editor, you can use the EditButton.Position property.

    ASPxSpinEdit View

    Affected Properties

    ASPxSpinEdit_concepts_all_buttons

    ShowIncrementButtons = True

    ShowLargeIncrementButtons = True

    SpinButtons.Position = Left

    ASPxSpinEdit_concepts_inc_buttons

    ShowIncrementButtons = True

    ShowLargeIncrementButtons = False

    SpinButtons.Position = Right

    ASPxSpinEdit_concepts_Linc_buttons

    ShowIncrementButtons = False

    ShowLargeIncrementButtons = True

    SpinButtons.Position = Right

  • Float or Integer Value Editing

    ASPxSpinEdit supports float and integer edit modes controlled by the ASPxSpinEdit.NumberType property. In integer mode (when the NumberType property is set to Integer), float value input is disabled and float values displayed within the editor are automatically rounded after modification. In float mode, culture-specific separators can display decimal separators based on the culture. Use the ASPxSpinEdit.DecimalPlaces property to define the number of decimal places.

    ASPxSpinEdit View

    Affected Properties

    ASPxSpinEdit_concepts_inc_buttons

    NumberType = Integer

    ASPxSpinEdit_concepts_dec_places

    NumberType = Float

    DecimalPlaces = 2

    Increment = 10.253

  • Customizable Increment/Decrement Values

    When a user clicks a small or large spin button, the ASPxSpinEdit.Number property value is incremented or decremented by the amount specified by the ASPxSpinEdit.Increment or ASPxSpinEdit.LargeIncrement properties, respectively.

  • Customizable Minimum and Maximum Values

    You can use the ASPxSpinEdit.MinValue and ASPxSpinEdit.MaxValue properties to define the minimum and maximum allowed values. This limits user input by the specified range.

  • Out of Range Warning

    If the ASPxSpinEdit.ShowOutOfRangeWarning property is set to true, the ASPxSpinEdit editor displays a warning message when a user types a date that is out of the range specified by the ASPxSpinEdit.MinValue and ASPxSpinEdit.MaxValue properties.

    ASPxSpinEdit_Warning

  • Mouse Wheel and Keyboard Support

    Users can use a mouse wheel or keyboard keys to change the ASPxSpinEdit value (the Up and Down arrow keys - for small increments/decrements; the Ctrl+Up arrow and Ctrl+Down arrow or Page up and Page down keys - for large increments/decrements).

  • Auto-Repeat Functionality

    When users press and hold a spin button, it continuously increments/decrements the editor value. This auto-repeat functionality is also available when users press and hold the Up and Down arrow keys to increment or decrement a value.

  • Full-Featured Client-Side API

    The ASPxClientSpinEdit object is the client-side equivalent of the ASPxSpinEdit control. This object exposes the control's comprehensive client-side API.

    You can use the following methods to work with editor values.

    Method Description
    ASPxClientSpinEdit.GetMaxValue Gets the maximum value of the editor.
    ASPxClientSpinEdit.GetMinValue Gets the minimum value of the editor.
    ASPxClientSpinEdit.GetNumber Gets a number which represents the spin editor's value.
    ASPxClientSpinEdit.GetText Returns the text displayed within the editor.
    ASPxClientSpinEdit.SetMaxValue Sets the maximum value of the editor.
    ASPxClientSpinEdit.SetMinValue Sets the minimum value of the editor.
    ASPxClientSpinEdit.SetNumber Sets the spin editor's value.