Skip to main content

ASPxSpinEdit Class

Represents the spin edit control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


public class ASPxSpinEdit :


The ASPxSpinEdit class represents an editor consisting of an edit region and one or two pairs of spin buttons which can be used to adjust the numerical value. This value is specified via the ASPxSpinEdit.Number property.


Create a SpinEdit Control

Design Time

The ASPxSpinEdit control is available on the DX.23.1: Common Controls toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.

<dx:ASPxSpinEdit ID="spinEdit" runat="server" Number="1" LargeIncrement="5" >
    <SpinButtons ShowIncrementButtons="False" ShowLargeIncrementButtons="True" />

Run Time

using DevExpress.Web;
protected void Page_Load(object sender, EventArgs e)
    ASPxSpinEdit spinEdit = new ASPxSpinEdit();
    spinEdit.ID = "spinEdit";

    spinEdit.Number = 1;
    spinEdit.SpinButtons.ShowIncrementButtons = false;
    spinEdit.SpinButtons.ShowLargeIncrementButtons = true;
    spinEdit.LargeIncrement = 5;


DevExpress controls require that you register special modules, handlers, and options in the Web.config file. You can change this file or switch to the Design tab in the Microsoft Visual Studio IDE to automatically update the Web.config file. Note that this information is automatically registered if you use the DevExpress Template Gallery to create a project.

The appearance and position of spin buttons can be controlled using the settings available via the ASPxSpinEdit.SpinButtons property.

When an end-user presses a small or large spin button, the ASPxSpinEdit.Number property’s value is incremented or decremented by the amount specified by the ASPxSpinEdit.Increment or ASPxSpinEdit.LargeIncrement property respectively. The value of the ASPxSpinEdit control can also be changed using mouse wheel and keyboard (the ARROW UP and ARROW DOWN keys - for small increment/decrement; the CTRL+ARROW UP and CTRL+ARROW DOWN or PAGE UP and PAGE DOWN keys - for large increment/decrement).

The ASPxSpinEdit.Number property’s value can be limited via the ASPxSpinEdit.MinValue and ASPxSpinEdit.MaxValue properties. Note, that these limitations are not applicable to the ASPxSpinEdit.Value property of the ASPxSpinEdit. The ASPxSpinEdit.Value property can be assigned a value that exceeds the specified limits, but editing can only be applied within these limits. If the ASPxSpinEdit.AllowNull property is set to true, the ASPxSpinEdit can accept null values.

The ASPxSpinEdit control can function in float or integer editing mode depending upon the ASPxSpinEdit.NumberType property’s setting. In integer mode, float value input is disabled and float values displayed within the editor are automatically rounded after they has been modified. In float mode, culture specific separators are supported, allowing decimal separators to display uniquely in various cultures. The number of decimal places can be defined using the ASPxSpinEdit.DecimalPlaces property.


The client-side equivalent of this editor control is represented by the ASPxClientSpinEdit object. The client editor object can be accessed directly by the name specified via the ASPxEditBase.ClientInstanceName property. The editor’s client-side API is enabled if the ASPxEditBase.EnableClientSideAPI property is set to true, or any client event is handled. Available client events can be accessed via the ASPxSpinEdit.ClientSideEvents property.

See Also