# ComboBox

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [ListControl](/api/wisej.web/lists-and-grids/listcontrol.md)
    * [ComboBox](/api/wisej.web/lists-and-grids/combobox.md)

Represents a combo box control.

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

```csharp
public class ComboBox : ListControl, ILabel, IReadOnly
```

{% endtab %}

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

```visual-basic
Public Class ComboBox
    Inherits ListControl
    Implements ILabel, IReadOnly
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes an instance of ComboBox.

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(onSelectedIndexChanged)

Initializes a new instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) class with specific initial settings.

| Name                       | Type                                                                                | Description                                            |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------ |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | [SelectedIndexChanged](#selectedindexchanged) handler. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(label, onSelectedIndexChanged)

Initializes a new instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) class with specific initial settings.

| Name                       | Type                                                                                | Description                                                                                      |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **label**                  | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | The initial text to display in the [TextBox](/api/wisej.web/editors/wisej.web.textbox.md) label. |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | [SelectedIndexChanged](#selectedindexchanged) handler.                                           |

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(dataSource, displayMember, valueMember, iconMember, onSelectedIndexChanged)

Initializes a new instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) class with specific initial settings.

| Name                       | Type                                                                                | Description                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **dataSource**             | [Object](https://docs.microsoft.com/dotnet/api/system.object)                       | Initial [DataSource](/api/wisej.web/lists-and-grids/listcontrol.md#datasource).       |
| **displayMember**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [DisplayMember](/api/wisej.web/lists-and-grids/listcontrol.md#displaymember). |
| **valueMember**            | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [ValueMember](/api/wisej.web/lists-and-grids/listcontrol.md#valuemember).     |
| **iconMember**             | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [IconMember](/api/wisej.web/lists-and-grids/listcontrol.md#iconmember).       |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [SelectedIndexChanged](#selectedindexchanged) handler.                       |

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(location, size, onSelectedIndexChanged)

Initializes an instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) with the given datasource, size, location, and action.

| Name                       | Type                                                                                | Description                                                     |
| -------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| **location**               | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.                                               |
| **size**                   | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.                                                   |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [SelectedIndexChanged](#selectedindexchanged) handler. |

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(location, size, dataSource, displayMember, valueMember, iconMember, onSelectedIndexChanged)

Initializes an instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) with the given datasource, size, location, and action.

| Name                       | Type                                                                                | Description                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **location**               | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.                                                                     |
| **size**                   | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.                                                                         |
| **dataSource**             | [Object](https://docs.microsoft.com/dotnet/api/system.object)                       | Initial [DataSource](/api/wisej.web/lists-and-grids/listcontrol.md#datasource).       |
| **displayMember**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [DisplayMember](/api/wisej.web/lists-and-grids/listcontrol.md#displaymember). |
| **valueMember**            | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [ValueMember](/api/wisej.web/lists-and-grids/listcontrol.md#valuemember).     |
| **iconMember**             | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [IconMember](/api/wisej.web/lists-and-grids/listcontrol.md#iconmember).       |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [SelectedIndexChanged](#selectedindexchanged) handler.                       |

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(label, location, size, onSelectedIndexChanged)

Initializes an instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) with the given datasource, size, location, and action.

| Name                       | Type                                                                                | Description                                                                                      |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **label**                  | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | The initial text to display in the [TextBox](/api/wisej.web/editors/wisej.web.textbox.md) label. |
| **location**               | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.                                                                                |
| **size**                   | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.                                                                                    |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [SelectedIndexChanged](#selectedindexchanged) handler.                                  |

### ![](/files/hsR4ok3152WyAf8J2C1u) ComboBox(label, location, size, dataSource, displayMember, valueMember, iconMember, onSelectedIndexChanged)

Initializes an instance of [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) with the given datasource, size, location, and action.

| Name                       | Type                                                                                | Description                                                                                      |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **label**                  | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | The initial text to display in the [TextBox](/api/wisej.web/editors/wisej.web.textbox.md) label. |
| **location**               | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | Initial location.                                                                                |
| **size**                   | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | Initial size.                                                                                    |
| **dataSource**             | [Object](https://docs.microsoft.com/dotnet/api/system.object)                       | Initial [DataSource](/api/wisej.web/lists-and-grids/listcontrol.md#datasource).                  |
| **displayMember**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [DisplayMember](/api/wisej.web/lists-and-grids/listcontrol.md#displaymember).            |
| **valueMember**            | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [ValueMember](/api/wisej.web/lists-and-grids/listcontrol.md#valuemember).                |
| **iconMember**             | [String](https://docs.microsoft.com/dotnet/api/system.string)                       | Initial [IconMember](/api/wisej.web/lists-and-grids/listcontrol.md#iconmember).                  |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | Optional [SelectedIndexChanged](#selectedindexchanged) handler.                                  |

## Properties

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating that the control can display html in the Text property. (Default: `False`)

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

[AutoCompleteMode](/api/wisej.web/enumerations/wisej.web.autocompletemode.md): Returns or sets how automatic completion works for the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md). (Default: `None`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the height of the control is set automatically. (Default: `True`)

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

[CharacterCasing](/api/wisej.web/editors/wisej.web.charactercasing.md): Returns or sets whether the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control modifies the case of characters as they are typed. (Default: `Normal`)

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

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

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the maximum height in pixels of the drop-down portion of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md). (Default: `400`)

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The specified value is less than one.

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

[ComboBoxStyle](/api/wisej.web/enumerations/wisej.web.comboboxstyle.md): Returns or sets the drop down style of the combo box. (Default: `DropDown`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the maximum width in pixels of the drop-down list of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md). When the value is 0, the drop-down list will grow to fit the largest item. (Default: `0`)

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The specified value is less than one.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the combo box is displaying its drop-down portion.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables the browser's context menu. (Default: `True`)

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether items are selected incrementally as the user types within a timeout of 1 second. (Default: `True`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Gets or sets the height of the list items in the drop-down list. When the value is -1, uses the value set in the theme. (Default: `-1`)

**Throws:**

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

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

[ObjectCollection](/api/wisej.web/lists-and-grids/combobox/wisej.web.combobox.objectcollection.md): Returns the collection of the items contained in this [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

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

[LabelWrapper](/api/wisej.web/editors/wisej.web.labelwrapper.md): Provides a label related to the control.

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

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

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the items are sent to the client the first time the list is opened and enables the [Load](#load) event. (Default: `False`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of characters a user can type into the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md). (Default: `0`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The value is less than 0.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the control is read-only. (Default: `False`)

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

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

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The specified index is less than -1; o the specified index is greater than the number of items in the combo box.

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets currently selected item in the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text that is selected in the editable portion of a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of characters selected in the editable portion of the combo box.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The value was less than zero.

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the starting index of text selected in the combo box.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The value is less than zero.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the items in the combo box are sorted. (Default: `False`)

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) An attempt was made to sort a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) that is attached to a data source.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the text in the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) is spell checked by the browser. (Default: `False`)

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

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

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

[ComponentToolCollection](/api/wisej.web/editors/wisej.web.componenttoolcollection.md): Returns the instance of [ComponentToolCollection](/api/wisej.web/editors/wisej.web.componenttoolcollection.md) associated with this control.

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text to show when the control is empty. (Default: `null`)

## Methods

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

Not used. Kept for compatibility.

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

Copies the current selection in the text box to the Clipboard.

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

Creates a new instance of the item collection.

**Returns:** [ObjectCollection](/api/wisej.web/lists-and-grids/combobox/wisej.web.combobox.objectcollection.md). A [ObjectCollection](/api/wisej.web/lists-and-grids/combobox/wisej.web.combobox.objectcollection.md) that represents the new item collection.

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

Moves the current selection in the text box to the Clipboard.

### ![](/files/lzopMboA31bVq8UIcbT3) Dispose(disposing)

Disposes the control.

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

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

Not used. Kept for compatibility.

### ![](/files/hsR4ok3152WyAf8J2C1u) FindString(text)

Returns the index of the first item in the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) that starts with the specified string.

| Parameter | Type                                                          | Description                                                                      |
| --------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **text**  | [String](https://docs.microsoft.com/dotnet/api/system.string) | The [String](https://docs.microsoft.com/dotnet/api/system.string) to search for. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index of the first item found; returns -1 if no match is found.

### ![](/files/hsR4ok3152WyAf8J2C1u) FindString(text, startIndex)

Returns the index of the first item in the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) beyond the specified index that starts with the specified string. The search is not case sensitive.

| Parameter      | Type                                                          | Description                                                                                                                   |
| -------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **text**       | [String](https://docs.microsoft.com/dotnet/api/system.string) | The [String](https://docs.microsoft.com/dotnet/api/system.string) to search for.                                              |
| **startIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index of the first item found; returns -1 if no match is found, or 0 if the *text* parameter specifies [Empty](https://docs.microsoft.com/dotnet/api/system.string.empty).

### ![](/files/hsR4ok3152WyAf8J2C1u) FindStringExact(text)

Finds the first item in the combo box that matches the specified string.

| Parameter | Type                                                          | Description                                                                      |
| --------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **text**  | [String](https://docs.microsoft.com/dotnet/api/system.string) | The [String](https://docs.microsoft.com/dotnet/api/system.string) to search for. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index of the first item found; returns -1 if no match is found, or 0 if the *text* parameter specifies [Empty](https://docs.microsoft.com/dotnet/api/system.string.empty).

### ![](/files/hsR4ok3152WyAf8J2C1u) FindStringExact(text, startIndex)

Finds the first item after the specified index that matches the specified string.

| Parameter      | Type                                                          | Description                                                                                                                   |
| -------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **text**       | [String](https://docs.microsoft.com/dotnet/api/system.string) | The [String](https://docs.microsoft.com/dotnet/api/system.string) to search for.                                              |
| **startIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index of the first item found; returns -1 if no match is found, or 0 if the *text* parameter specifies [Empty](https://docs.microsoft.com/dotnet/api/system.string.empty).

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

Fires the [AutoComplete](#autocomplete) event.

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

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

Fires the [DataSourceChanged](/api/wisej.web/lists-and-grids/listcontrol.md#datasourcechanged) 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) OnDisplayMemberChanged(e)

Fires the [DisplayMemberChanged](/api/wisej.web/lists-and-grids/listcontrol.md#displaymemberchanged) 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) OnDropDown(e)

Fires the [DropDown](#dropdown) 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) OnDropDownClosed(e)

Fires the [DropDownClosed](#dropdownclosed) 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) OnDropDownStyleChanged(e)

Fires the [DropDownStyleChanged](#dropdownstylechanged) 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) OnLoad(e)

Fires the [Load](#load) 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) OnReadOnlyChanged(e)

Fires the [ReadOnlyChanged](#readonlychanged) 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) OnSelectedIndexChanged(e)

Fires the [SelectedIndexChanged](#selectedindexchanged) 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) OnSelectedItemChanged(e)

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

Fires the [SelectionChangeCommitted](#selectionchangecommitted) 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) 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) OnToolClick(e)

Fires the ToolClick event.

| Parameter | Type                                                                         | Description                                                                                                  |
| --------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| **e**     | [ToolClickEventArgs](/api/wisej.web/editors/wisej.web.toolclickeventargs.md) | A [ToolClickEventArgs](/api/wisej.web/editors/wisej.web.toolclickeventargs.md) 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) OnValueMemberChanged(e)

Fires the [ValueMemberChanged](/api/wisej.web/lists-and-grids/listcontrol.md#valuememberchanged) 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/hsR4ok3152WyAf8J2C1u) Paste()

Replaces the current selection in the text box with the contents of the Clipboard.

### ![](/files/lzopMboA31bVq8UIcbT3) RefreshItem(index)

Refreshes the item contained at the specified location.

| Parameter | Type                                                        | Description                          |
| --------- | ----------------------------------------------------------- | ------------------------------------ |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The location of the item to refresh. |

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

Reloads all the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) items from the data source.

### ![](/files/hsR4ok3152WyAf8J2C1u) Select(start, length)

Selects a range of text in the editable portion of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

| Parameter  | Type                                                        | Description                                                                            |
| ---------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| **start**  | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The position of the first character in the current text selection within the text box. |
| **length** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The number of characters to select.                                                    |

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

Selects all the text in the editable portion of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

### ![](/files/lzopMboA31bVq8UIcbT3) SetBoundsCore(x, y, width, height, specified)

Sets the specified bounds of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control.

| Parameter     | Type                                                                        | Description                                                                                              |
| ------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **x**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Left](/api/wisej.web/general/control.md#left) property value of the control.                    |
| **y**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Top](/api/wisej.web/general/control.md#top) property value of the control.                      |
| **width**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Width](/api/wisej.web/general/control.md#width) property value of the control.                  |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | Not used.                                                                                                |
| **specified** | [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) | A combination of the [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) values. |

### ![](/files/lzopMboA31bVq8UIcbT3) SetItemCore(index, value)

Sets the object with the specified index in the derived class.

| Parameter | Type                                                          | Description                    |
| --------- | ------------------------------------------------------------- | ------------------------------ |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The array index of the object. |
| **value** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The object.                    |

### ![](/files/lzopMboA31bVq8UIcbT3) SetItemsCore(value)

Sets the specified array of objects in a collection in the derived class.

| Parameter | Type                                                                    | Description        |
| --------- | ----------------------------------------------------------------------- | ------------------ |
| **value** | [IList](https://docs.microsoft.com/dotnet/api/system.collections.ilist) | An array of items. |

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

Sorts the items in the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

## Events

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

[HandledEventHandler](https://docs.microsoft.com/dotnet/api/system.componentmodel.handledeventhandler) Fired before the [Validating](/api/wisej.web/general/control.md#validating) event when [DropDownStyle](#dropdownstyle) is set to [DropDown](/api/wisej.web/enumerations/wisej.web.comboboxstyle.md#fields) or [Simple](/api/wisej.web/enumerations/wisej.web.comboboxstyle.md#fields).

The application may implement a different way to select the item when the user types a text and the ComboBox is validated. Set e.Handled to true to override the standard behavior.

```csharp


this.comboBox1.AutoComplete += (s, e) =>
{
  if (this.comboBox1.Text == "T")
  {
    this.compoBox1.SelectedIndex = 1;
    e.Handled = true;
  }
}


```

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the drop-down portion of a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) is shown.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the drop-down portion of the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) is no longer visible.

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

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

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the drop-down list is first opened and the [LazyLoading](#lazyloading) property is true.

When [LazyLoading](#lazyloading) is true An application may fill the items at any time prior to the drop-down list being opened, or while processing the [DropDown](#dropdown) or [Load](#load) event.

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [ReadOnly](#readonly) property has changed.

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

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

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

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

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

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the selected item has changed and that change is displayed in the [ComboBox](/api/wisej.web/lists-and-grids/combobox.md).

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

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

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

[ToolClickEventHandler](/api/wisej.web/editors/wisej.web.toolclickeventhandler.md) Fired when a [ComponentTool](/api/wisej.web/editors/wisej.web.componenttool.md) is clicked.

## Inherited By

| Name                                                                                                                              | Description                                                                                                                                                                                                        |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [DataGridViewComboBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxeditingcontrol.md) | Represents a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control that can be hosted in a [DataGridViewComboBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell.md). |
| [ListViewComboBox](/api/wisej.web/lists-and-grids/wisej.web.listviewcombobox.md)                                                  | The TreeViewComboBox control represents a [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md) control with a [ListView](/api/wisej.web/lists-and-grids/listview.md) as the drop down panel.   |
| [TreeViewComboBox](/api/wisej.web/lists-and-grids/wisej.web.treeviewcombobox.md)                                                  | The TreeViewComboBox control represents a [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md) control with a [TreeView](/api/wisej.web/lists-and-grids/treeview.md) as the drop down panel.   |
| [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md)                                                          | The UserComboBox control represents a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control with a custom panel that drops down when the user clicks the down arrow.                                      |

## 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.                                                                                            |
| [IModified](/api/wisej.web/interfaces/wisej.web.imodified.md)                     | Provides access to the [Modified](/api/wisej.web/interfaces/wisej.web.imodified.md#modified) property and [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event for controls that implement this interface. |
| [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/lists-and-grids/combobox.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.
