# NumericUpDown

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [UpDownBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.updownbase)
    * [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown)

Represents a spinner control that displays numeric values.

{% tabs %}
{% tab title="C#" %}

```csharp
public class NumericUpDown : UpDownBase, ISupportInitialize, INotifyPropertyChanged
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class NumericUpDown
    Inherits UpDownBase
    Implements ISupportInitialize, INotifyPropertyChanged
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NumericUpDown()

Initializes a new instance of the [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NumericUpDown(onValueChanged)

Initializes a new instance of the [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) class with specific initial settings.

| Name               | Type                                                                                | Description                                                                    |
| ------------------ | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **onValueChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [ValueChanged](#valuechanged) event is raised. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NumericUpDown(label, onValueChanged)

Initializes a new instance of the [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) class with specific initial settings.

| Name               | Type                                                                                | Description                                                                                     |
| ------------------ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **label**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [LabelText](https://docs.wisej.com/api/wisej.web/wisej.web.updownbase#labeltext) value. |
| **onValueChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [ValueChanged](#valuechanged) event is raised.                  |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NumericUpDown(location, size, onValueChanged)

Initializes a new instance of the [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) class with specific initial settings.

| Name               | Type                                                                                | Description                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **location**       | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | The Point specifying the upper-left corner of the NumericUpDown control relative to the upper-left corner of its container. |
| **size**           | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | The Size of the NumericUpDown control.                                                                                      |
| **onValueChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [ValueChanged](#valuechanged) event is raised.                                              |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NumericUpDown(label, location, size, onValueChanged)

Initializes a new instance of the [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) class with specific initial settings.

| Name               | Type                                                                                | Description                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **label**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [LabelText](https://docs.wisej.com/api/wisej.web/wisej.web.updownbase#labeltext) value.                             |
| **location**       | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | The Point specifying the upper-left corner of the NumericUpDown control relative to the upper-left corner of its container. |
| **size**           | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | The Size of the NumericUpDown control.                                                                                      |
| **onValueChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [ValueChanged](#valuechanged) event is raised.                                              |

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DecimalPlaces

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of decimal places to display in the spin box (also known as an up-down control). (Default: `0`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The value assigned is less than 0; or the value assigned is greater than 99.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Hexadecimal

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the spin box (also known as an up-down control) should display the value it contains in hexadecimal format. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Increment

[Decimal](https://docs.microsoft.com/dotnet/api/system.decimal): Returns or sets the value to increment or decrement the spin box (also known as an up-down control) when the up or down buttons are clicked. (Default: `1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The assigned value is not greater than or equal to zero.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Maximum

[Decimal](https://docs.microsoft.com/dotnet/api/system.decimal): Returns or sets the maximum value for the spin box (also known as an up-down control). (Default: `100`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Minimum

[Decimal](https://docs.microsoft.com/dotnet/api/system.decimal): Returns or sets the minimum allowed value for the spin box (also known as an up-down control). (Default: `0`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NullableValue

[Nullable\<Decimal>](https://docs.microsoft.com/dotnet/api/system.nullable-1): Returns or sets the [Value](#value) assigned to the spin box (also known as an up-down control) with the difference that when the text is empty it returns null. (Default: `0`)

This property should be used when the [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) may hold a null value and it's bound to a database nullable column. **Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The assigned value is less than the [Minimum](#minimum) property value; or the assigned value is greater than the [Maximum](#maximum) property value.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Postfix

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets a string to display after the value. (Default: `""`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Prefix

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets a string to display before the value. (Default: `""`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ThousandsSeparator

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether a thousands separator is displayed in the spin box (also known as an up-down control) when appropriate. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Value

[Decimal](https://docs.microsoft.com/dotnet/api/system.decimal): Returns or sets the value assigned to the spin box (also known as an up-down control). (Default: `0`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The assigned value is less than the [Minimum](#minimum) property value; or the assigned value is greater than the [Maximum](#maximum) property value.

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnLeave(e)

Fires the [Leave](https://docs.wisej.com/api/general/control#leave) event.

| Parameter | Type                                                                | Description                                                                                          |
| --------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | An [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnValidating(e)

Fires the [Validating](https://docs.wisej.com/api/general/control#validating) event.

| Parameter | Type                                                                                           | Description                                                                                         |
| --------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [CancelEventArgs](https://docs.microsoft.com/dotnet/api/system.componentmodel.canceleventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnValueChanged(e)

Fires the [ValueChanged](#valuechanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                                           | Description      |
| --------- | ------------------------------------------------------------------------------ | ---------------- |
| **e**     | [WisejEventArgs](https://docs.wisej.com/api/wisej.core/general/wisejeventargs) | Event arguments. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebUpdate(state)

Updates the client component using the state information.

| Parameter | Type                                                          | Description           |
| --------- | ------------------------------------------------------------- | --------------------- |
| **state** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic state object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) UpdateEditText()

Displays the current value of the spin box (also known as an up-down control) in the appropriate format.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) ValidateEditText()

Validates and updates the text displayed in the spin box (also known as an up-down control).

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). True if the text represents a valid value.

## Events

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ValueChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the [Value](#value) property has been changed in some way.

## Inherited By

| Name                                                                                                                                                           | Description                                                                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [DataGridViewNumericUpDownEditingControl](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowneditingcontrol) | Represents a [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) control that can be hosted in a [DataGridViewNumericUpDownCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell). |

## Implements

| Name                                                                                                 | Description                                                                                                                                                            |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                                                        |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                                                          |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                 | Controls that support drag & drop operations implement this interface.                                                                                                 |
| [ILabel](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ilabel)                           | Provides access to the [LabelWrapper](https://docs.wisej.com/api/wisej.web/editors/wisej.web.labelwrapper) associated with the controls that implement this interface. |
| [IReadOnly](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ireadonly)                     | Provides access to the [ReadOnly](https://docs.wisej.com/api/interfaces/wisej.web.ireadonly#readonly) property for coontrols that support the read-only mode.          |
| [IValidation](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ivalidation)                 | Provides access to the validation events and properties property for controls that support validation.                                                                 |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                                                         |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface.                               |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                                                  |
