# NumericUpDown

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [UpDownBase](/api/wisej.web/editors/wisej.web.updownbase.md)
    * [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md)

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

### ![](/files/hsR4ok3152WyAf8J2C1u) NumericUpDown()

Initializes a new instance of the [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) class.

### ![](/files/hsR4ok3152WyAf8J2C1u) NumericUpDown(onValueChanged)

Initializes a new instance of the [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) 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. |

### ![](/files/hsR4ok3152WyAf8J2C1u) NumericUpDown(label, onValueChanged)

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

| Name               | Type                                                                                | Description                                                                          |
| ------------------ | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **label**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [LabelText](/api/wisej.web/editors/wisej.web.updownbase.md#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.       |

### ![](/files/hsR4ok3152WyAf8J2C1u) NumericUpDown(location, size, onValueChanged)

Initializes a new instance of the [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) 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.                                              |

### ![](/files/hsR4ok3152WyAf8J2C1u) NumericUpDown(label, location, size, onValueChanged)

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

| Name               | Type                                                                                | Description                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **label**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [LabelText](/api/wisej.web/editors/wisej.web.updownbase.md#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

### ![](/files/hsR4ok3152WyAf8J2C1u) 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.

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

### ![](/files/hsR4ok3152WyAf8J2C1u) 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.

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

### ![](/files/hsR4ok3152WyAf8J2C1u) 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](/api/wisej.web/editors/wisej.web.numericupdown.md) 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.

### ![](/files/hsR4ok3152WyAf8J2C1u) Postfix

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Prefix

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

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

### ![](/files/hsR4ok3152WyAf8J2C1u) 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

### ![](/files/lzopMboA31bVq8UIcbT3) OnLeave(e)

Fires the [Leave](/api/wisej.web/general/control.md#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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnValidating(e)

Fires the [Validating](/api/wisej.web/general/control.md#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. |

### ![](/files/lzopMboA31bVq8UIcbT3) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

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

### ![](/files/lzopMboA31bVq8UIcbT3) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) UpdateEditText()

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

### ![](/files/lzopMboA31bVq8UIcbT3) 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

### ![](/files/hsR4ok3152WyAf8J2C1u) 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](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowneditingcontrol.md) | Represents a [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) control that can be hosted in a [DataGridViewNumericUpDownCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell.md). |

## Implements

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
