# DomainUpDown

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)
    * [DomainUpDown](/api/wisej.web/editors/domainupdown.md)

Represents a spinner control that displays string values.

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

```csharp
public class DomainUpDown : UpDownBase
```

{% endtab %}

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

```visual-basic
Public Class DomainUpDown
    Inherits UpDownBase
```

{% endtab %}
{% endtabs %}

## Constructors

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

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

### ![](/files/hsR4ok3152WyAf8J2C1u) DomainUpDown(onSelectedItemChanged)

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

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

### ![](/files/hsR4ok3152WyAf8J2C1u) DomainUpDown(label, onSelectedItemChanged)

Initializes a new instance of the [DomainUpDown](/api/wisej.web/editors/domainupdown.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.         |
| **onSelectedItemChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [SelectedItemChanged](#selecteditemchanged) event is raised. |

### ![](/files/hsR4ok3152WyAf8J2C1u) DomainUpDown(location, size, onSelectedItemChanged)

Initializes a new instance of the [DomainUpDown](/api/wisej.web/editors/domainupdown.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 DomainUpDown 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 DomainUpDown control.                                                                                      |
| **onSelectedItemChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [SelectedItemChanged](#selecteditemchanged) event is raised.                               |

### ![](/files/hsR4ok3152WyAf8J2C1u) DomainUpDown(label, location, size, onSelectedItemChanged)

Initializes a new instance of the [DomainUpDown](/api/wisej.web/editors/domainupdown.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 DomainUpDown 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 DomainUpDown control.                                                                                      |
| **onSelectedItemChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | The delegate to invoke when the [SelectedItemChanged](#selecteditemchanged) event is raised.                               |

## Properties

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns the default size for a text box control.

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

[DomainUpDownItemCollection](/api/wisej.web/editors/domainupdown/wisej.web.domainupdown.domainupdownitemcollection.md): A collection of objects assigned to the spinner control.

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the index value of the selected item. (Default: `-1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The assigned value is less than the default, -1; or the assigned value is greater than the [Items](#items) count.

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the selected item based on the index value of the selected item in the collection.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the item collection is sorted. (Default: `False`)

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text associated with this control. (Default: `""`)

When AllowHtml is set to true, the text can contain HTML content. If the text contains new lines (CRLF) but doesn't contain HTML elements (at least one "<") all CRLF are automatically substituted with "\<BR/>".

## Methods

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

Fires the [SelectedItemChanged](#selecteditemchanged) 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) OnSortedChanged(e)

Fires the [SortedChanged](#sortedchanged) 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 value of the currently selected item.

## Events

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the [SelectedItem](#selecteditem) property has been changed.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the [Sorted](#sorted) property has changed.

## 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/domainupdown.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.
