Skip to main content
A newer version of this page is available. .
Tab

ASPxSpinEdit.Number Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

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>
...

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Number property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also