Skip to main content
Tab

ASPxSpinEdit.Number Property

Gets or sets the decimal representation of the spin editor’s ASPxSpinEdit.Value.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(typeof(decimal), "0")]
public decimal Number { get; set; }

Property Value

Type Default Description
Decimal "0"

A decimal value representing the ASPxSpinEdit.Value property of the spin editor.

Remarks

Use the Number property to specify the spin editor’s decimal value. When this property is changed by an end-user at runtime, the ASPxSpinEdit.NumberChanged event is raised.

The Number property can vary between the ASPxSpinEdit.MinValue and ASPxSpinEdit.MaxValue property values. Note, that the ASPxSpinEdit.Value property can exceed the limits specified via the before-mentioned properties. In this case, the spin editor displays the ASPxSpinEdit.Value property’s value, but editing can only be performed within the specified ranges.

Important

The Number property returns the decimal representation of the ASPxSpinEdit.Value property. Since the Decimal is not a nullable structure, when the ASPxSpinEdit.Value property is set to null, the Number property returns the Decimal.MinValue field value. Thus, when you create a ASPxSpinEdit control at runtime, the default value of the Number property is, in fact, Decimal.MinValue.

Example

The complete sample project is available in the DevExpress Code Central database at E55.

...
<dxe:ASPxSpinEdit ID="spnLeft" runat="server" Width="60px" Height="21px" 
Number="600" MinValue="0" MaxValue="2000" AllowNull="False">
</dxe:ASPxSpinEdit>
...
See Also