# DataGridViewComboBoxColumn

Namespace: **Wisej.Web**

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

* [DataGridViewElement](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement)
  * [DataGridViewBand](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband)
    * [DataGridViewColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn)
      * [DataGridViewComboBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn)

Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewComboBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell) cells.

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

```csharp
public class DataGridViewComboBoxColumn : DataGridViewColumn
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewComboBoxColumn
    Inherits DataGridViewColumn
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of the [DataGridViewComboBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn) class to the default state.

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

Initializes a new instance of the [DataGridViewComboBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn) class to the default state.

| Name             | Type                                                                                                                             | Description                                                                                                                                                    |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **cellTemplate** | [DataGridViewComboBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell) | An existing [DataGridViewButtonCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncell) to use as a template. |

## Properties

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

[AutoCompleteMode](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.autocompletemode): Returns or sets how automatic completion works for the [DataGridViewComboBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn). (Default: `None`)

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

[DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell): Returns or sets the template used to model cell appearance.

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The type is null.
* [InvalidCastException](https://docs.microsoft.com/dotnet/api/system.invalidcastexception)\
  The set type is not compatible with type [DataGridViewComboBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell).

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

[CharacterCasing](https://docs.wisej.com/api/wisej.web/editors/wisej.web.charactercasing): Returns or sets whether the cell editor modifies the case of characters as they are typed. (Default: `Normal`)

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the data source that populates the selections for the combo boxes. (Default: `null`)

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the name of the property or column from which to retrieve the text to display in the combo box cell. (Default: `""`)

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

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

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the name of the property or column from which to get the icon to use in the drop-down list. (Default: `""`)

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

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

[ObjectCollection](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell.objectcollection): Returns the collection of the items contained in this [DataGridViewComboBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn).

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the [CellTemplate](#celltemplate) property is null.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables lazy loading mode for the [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox) cell editor control. (Default: `False`)

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the maximum number of characters that can be entered into the editable part of the combo box control. (Default: `0`)

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the [CellTemplate](#celltemplate) property is null.

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

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

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  An attempt was made to sort a cell that is attached to a data source.

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

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

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the name of the property or column from which to get the value that correspond to the selections in the drop-down list. (Default: `""`)

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

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns or sets the data type of the values in the column's cells.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables virtual scrolling mode for the [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox) cell editor control. (Default: `False`)

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

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

## Methods

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

Called when the element is associated with a different [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview).

## Implements

| Name                                                                                                 | Description                                                                                                     |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                  |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                           |
