# ComboBoxExtensions

Namespace: **Wisej.Web.Markup**

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

Adds [fluent markup](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/markup/markup) extension methods to the [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox) class.

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

```csharp
public class ComboBoxExtensions
```

{% endtab %}

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

```visual-basic
Public Class ComboBoxExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) AutoCompleteMode\<TComboBox>(comboBox, autoCompleteMode)

Sets the AutoCompleteMode property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter            | Type                                                                                                    | Description                                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox**        |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**         | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the AutoCompleteMode property.                                                           |
| **autoCompleteMode** | [AutoCompleteMode](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.autocompletemode)        | The [AutoCompleteMode](#autocompletemode``1) to set for the combo box.                                                  |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated AutoCompleteMode property.

This method allows you to specify the auto-complete mode for the combo box.

```csharp

myComboBox.AutoCompleteMode(AutoCompleteMode.SuggestAppend);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) CharacterCasing\<TComboBox>(comboBox, casing)

Sets the CharacterCasing property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the CharacterCasing property.                                                            |
| **casing**    | [CharacterCasing](https://docs.wisej.com/api/wisej.web/editors/wisej.web.charactercasing)               | The [CharacterCasing](#charactercasing``1) to set for the combo box.                                                    |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated CharacterCasing property.

This method allows you to specify the character casing for the text in the combo box.

```csharp

myComboBox.CharacterCasing(CharacterCasing.Upper);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) DropDownHeight\<TComboBox>(comboBox, height)

Sets the DropDownHeight property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the DropDownHeight property.                                                             |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                             | The height of the drop-down portion of the combo box.                                                                   |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated DropDownHeight property.

This method allows you to specify the height of the drop-down portion of the combo box.

```csharp

myComboBox.DropDownHeight(200);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) DropDownStyle\<TComboBox>(comboBox, style)

Sets the DropDownStyle property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                              |
| ------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).  |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the DropDownStyle property.                                                               |
| **style**     | [ComboBoxStyle](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.comboboxstyle)              | The [ComboBoxStyle](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.comboboxstyle) to set for the combo box. |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated DropDownStyle property.

This method allows you to specify the drop-down style for the combo box.

```csharp

myComboBox.DropDownStyle(ComboBoxStyle.DropDownList);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) DropDownWidth\<TComboBox>(comboBox, width)

Sets the DropDownWidth property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the DropDownWidth property.                                                              |
| **width**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                             | The width of the drop-down portion of the combo box.                                                                    |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated DropDownWidth property.

This method allows you to specify the width of the drop-down portion of the combo box.

```csharp

myComboBox.DropDownWidth(150);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) DroppedDown\<TComboBox>(comboBox, value)

Sets the DroppedDown property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the DroppedDown property.                                                                |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                         | A boolean indicating whether the combo box is dropped down.                                                             |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated DroppedDown property.

This method allows you to programmatically open or close the drop-down portion of the combo box.

```csharp

myComboBox.DroppedDown(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) IncrementalSelection\<TComboBox>(comboBox, value)

Sets the IncrementalSelection property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the IncrementalSelection property.                                                       |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                         | A boolean indicating whether incremental selection is enabled.                                                          |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated IncrementalSelection property.

This method allows you to enable or disable incremental selection for the combo box.

```csharp

myComboBox.IncrementalSelection(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) ItemHeight\<TComboBox>(comboBox, height)

Sets the ItemHeight property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the ItemHeight property.                                                                 |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                             | The height of each item in the combo box.                                                                               |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated ItemHeight property.

This method allows you to specify the height of each item in the combo box.

```csharp

myComboBox.ItemHeight(20);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Items\<TComboBox>(comboBox, items)

Adds the specified items to the Items collection of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to which the items should be added.                                                                       |
| **items**     | [ComponentTool\[\]](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool)               | An array of items to add to the combo box.                                                                              |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the added items.

This method allows you to add multiple items to the combo box in one call.

```csharp

myComboBox.Items("Item1", "Item2", "Item3");

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) LazyLoading\<TComboBox>(comboBox, value)

Sets the LazyLoading property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the LazyLoading property.                                                                |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                         | A boolean indicating whether lazy loading is enabled.                                                                   |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated LazyLoading property.

This method allows you to enable or disable lazy loading for the combo box.

```csharp

myComboBox.LazyLoading(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) MaxLength\<TComboBox>(comboBox, length)

Sets the MaxLength property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the MaxLength property.                                                                  |
| **length**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                             | The maximum number of characters that can be entered in the combo box.                                                  |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated MaxLength property.

This method allows you to specify the maximum number of characters that can be entered in the combo box.

```csharp

myComboBox.MaxLength(50);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnAutoComplete\<TComboBox>(comboBox, action)

Attaches an event handler for the AutoComplete event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox, HandledEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)           | An action to execute during the AutoComplete event, with the combo box and event arguments as parameters.               |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached AutoComplete event handler.

This method allows you to define custom auto-complete behavior by executing a specified action during the AutoComplete event.

```csharp

myComboBox.OnAutoComplete((cb, args) =>
{
// Custom auto-complete logic
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnDropDownClosed\<TComboBox>(comboBox, action)

Attaches an event handler for the DropDownClosed event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the drop-down portion of the combo box is closed.                                             |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached DropDownClosed event handler.

This method allows you to execute a custom action whenever the drop-down portion of the combo box is closed.

```csharp

myComboBox.OnDropDownClosed(cb =>
{
AlertBox.Show("Drop-down closed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnDropDownStyleChanged\<TComboBox>(comboBox, action)

Attaches an event handler for the DropDownStyleChanged event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the DropDownStyle property changes.                                                           |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached DropDownStyleChanged event handler.

This method allows you to execute a custom action whenever the DropDownStyle property of the combo box changes.

```csharp

myComboBox.OnDropDownStyleChanged(cb =>
{
AlertBox.Show("Drop-down style changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnLoad\<TComboBox>(comboBox, action)

Attaches an event handler for the Load event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the combo box is loaded.                                                                      |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached Load event handler.

This method allows you to execute a custom action whenever the combo box is loaded.

```csharp

myComboBox.OnLoad(cb =>
{
AlertBox.Show("Combo box loaded!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnSelectedIndexChanged\<TComboBox>(comboBox, action)

Attaches an event handler for the SelectedIndexChanged event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the SelectedIndex property changes.                                                           |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached SelectedIndexChanged event handler.

This method allows you to execute a custom action whenever the SelectedIndex property of the combo box changes.

```csharp

myComboBox.OnSelectedIndexChanged(cb =>
{
AlertBox.Show("Selected index changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnSelectedItemChanged\<TComboBox>(comboBox, action)

Attaches an event handler for the SelectedItemChanged event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the SelectedItem property changes.                                                            |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached SelectedItemChanged event handler.

This method allows you to execute a custom action whenever the SelectedItem property of the combo box changes.

```csharp

myComboBox.OnSelectedItemChanged(cb =>
{
AlertBox.Show("Selected item changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnSelectionChangeCommitted\<TComboBox>(comboBox, action)

Attaches an event handler for the SelectionChangeCommitted event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the selection change is committed by the user.                                                |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached SelectionChangeCommitted event handler.

This method allows you to execute a custom action whenever the user commits a selection change in the combo box.

```csharp

myComboBox.OnSelectionChangeCommitted(cb =>
{
AlertBox.Show("Selection change committed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnSortedChanged\<TComboBox>(comboBox, action)

Attaches an event handler for the SortedChanged event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox>](https://docs.microsoft.com/dotnet/api/system.action-1)                             | An action to execute when the Sorted property changes.                                                                  |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached SortedChanged event handler.

This method allows you to execute a custom action whenever the Sorted property of the combo box changes.

```csharp

myComboBox.OnSortedChanged(cb =>
{
AlertBox.Show("Sorted property changed!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) OnToolClick\<TComboBox>(comboBox, action)

Attaches an event handler for the ToolClick event of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to attach the event handler to.                                                                           |
| **action**    | [Action\<TComboBox, ToolClickEventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)         | An action to execute when a tool is clicked within the combo box.                                                       |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the attached ToolClick event handler.

This method allows you to execute a custom action whenever a tool within the combo box is clicked.

```csharp

myComboBox.OnToolClick((cb, e) =>
{
AlertBox.Show("Tool clicked!");
});

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectedItem\<TComboBox>(comboBox, item)

Sets the SelectedItem property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the SelectedItem property.                                                               |
| **item**      | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                           | The item to select in the combo box.                                                                                    |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated SelectedItem property.

This method allows you to specify the selected item in the combo box.

```csharp

myComboBox.SelectedItem("Item1");

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectedText\<TComboBox>(comboBox, text)

Sets the SelectedText property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the SelectedText property.                                                               |
| **text**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                                           | The text to select in the combo box.                                                                                    |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated SelectedText property.

This method allows you to specify the selected text in the combo box.

```csharp

myComboBox.SelectedText("SelectedText");

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectionLength\<TComboBox>(comboBox, length)

Sets the SelectionLength property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the SelectionLength property.                                                            |
| **length**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                             | The number of characters to select in the text of the combo box.                                                        |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated SelectionLength property.

This method allows you to specify the number of characters to select in the text of the combo box.

```csharp

myComboBox.SelectionLength(5);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectionStart\<TComboBox>(comboBox, index)

Sets the SelectionStart property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the SelectionStart property.                                                             |
| **index**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                             | The starting position of the text selection in the combo box.                                                           |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated SelectionStart property.

This method allows you to specify the starting position of the text selection in the combo box.

```csharp

myComboBox.SelectionStart(2);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SelectOnEnter\<TComboBox>(comboBox, value)

Sets the SelectOnEnter property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the SelectOnEnter property.                                                              |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                         | A boolean indicating whether the text should be selected on enter.                                                      |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated SelectOnEnter property.

This method allows you to enable or disable selecting the text when the combo box is entered.

```csharp

myComboBox.SelectOnEnter(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Sorted\<TComboBox>(comboBox, value)

Sets the Sorted property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the Sorted property.                                                                     |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                         | A boolean indicating whether the combo box is sorted.                                                                   |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated Sorted property.

This method allows you to specify whether the items in the combo box should be sorted automatically.

```csharp

myComboBox.Sorted(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SpellCheck\<TComboBox>(comboBox, value)

Sets the SpellCheck property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the SpellCheck property.                                                                 |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                         | A boolean indicating whether spell check is enabled.                                                                    |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated SpellCheck property.

This method allows you to enable or disable spell checking for the combo box.

```csharp

myComboBox.SpellCheck(true);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Tools\<TComboBox>(comboBox, tools)

Adds the specified tools to the Tools collection of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box to which the tools should be added.                                                                       |
| **tools**     | [ComponentTool\[\]](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool)               | An array of tools to add to the combo box.                                                                              |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the added tools.

This method allows you to add multiple tools to the combo box in one call.

```csharp

myComboBox.Tools(tool1, tool2, tool3);

```

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) Watermark\<TComboBox>(comboBox, text)

Sets the Watermark property of the specified [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox).

| Parameter     | Type                                                                                                    | Description                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **TComboBox** |                                                                                                         | The type of the combo box, must inherit from [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox). |
| **comboBox**  | [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions) | The combo box for which to set the Watermark property.                                                                  |
| **text**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                                           | The watermark text to display in the combo box.                                                                         |

**Returns:** [TComboBox](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.comboboxextensions). The modified combo box with the updated Watermark property.

This method allows you to set a watermark text for the combo box.

```csharp

myComboBox.Watermark("Enter text...");

```
