DataGridViewComboBoxCell

Wisej.Web.DataGridViewComboBoxCell

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Displays an editable ComboBox control in a DataGridViewCell cell when in edit mode.

public class DataGridViewComboBoxCell : DataGridViewCell

Constructors

DataGridViewComboBoxCell()

Initializes a new instance of DataGridViewComboBoxCell.

Properties

AutoCompleteMode

AutoCompleteMode: Returns or sets how automatic completion works for the DataGridViewComboBoxColumn. (Default: None)

CharacterCasing

CharacterCasing: Returns or sets whether the cell editor modifies the case of characters as they are typed. (Default: Normal)

DataSource

Objectarrow-up-right: Returns or sets the data source that contains the possible selections shown in the drop-down list.

Throws:

DisplayMember

Stringarrow-up-right: Returns or sets the name of the property or column from which to retrieve the text to display in the combo box cell. (Default: "")

Throws:

ComboBoxStyle: Returns or sets the style of the combo box. (Default: DropDown)

EditType

Typearrow-up-right: Returns the type of the cell's hosted editing control.

IconMember

Stringarrow-up-right: Returns or sets the name of the property or column from which to get the icon to use in the drop-down list. (Default: "")

Throws:

IncrementalSelection

Booleanarrow-up-right: Returns or sets whether items are selected incrementally as the user types within a timeout of 1 second. (Default: True)

Items

ObjectCollection: Returns the collection of the items contained in this DataGridViewComboBoxCell.

LazyLoading

Booleanarrow-up-right: Enables or disables lazy loading mode for the ComboBox cell editor control. (Default: False)

MaxInputLength

Int32arrow-up-right: Returns or sets the maximum number of characters that can be entered into the editable part of the combo box control. (Default: 0)

Throws:

Sorted

Booleanarrow-up-right: Returns or sets if the items in the combo box editor are automatically sorted. (Default: False)

Throws:

Tools

ComponentToolCollection: Returns the instance of ComponentToolCollection associated with this cell.

ValueMember

Stringarrow-up-right: 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: "")

Throws:

ValueType

Typearrow-up-right: Returns or sets the data type of the values in the cell.

VirtualScroll

Booleanarrow-up-right: Enables or disables virtual scrolling mode for the ComboBox cell editor control. (Default: False)

Watermark

Stringarrow-up-right: Returns or sets the text to show when the control is empty.

Methods

GetFormattedValue(value, cellStyle, valueTypeConverter, formattedTypeConverter)

Returns the value of the cell formatted to be displayed on the client.

Parameter
Type
Description

value

The value to be formatted.

cellStyle

The DataGridViewCellStyle in for the cell.

valueTypeConverter

A TypeConverterarrow-up-right providing custom conversion from the formatted type to the value type, or null if no custom conversion is required.

formattedTypeConverter

A TypeConverterarrow-up-right providing custom conversion from the value type to the formatted type, or null if no custom conversion is required.

Returns: Objectarrow-up-right. The value of the cell or null if the cell does not belong to a DataGridView control.

Throws:

OnDataGridViewChanged()

Called when the element is associated with a different DataGridView.

OnItemsCollectionChanged(e)

Fires the CollectionChanged event.

Parameter
Type
Description

ParseFormattedValue(value, cellStyle, formattedTypeConverter, valueTypeConverter)

Converts a value to the actual cell value.

Parameter
Type
Description

value

The display value of the cell.

cellStyle

The DataGridViewCellStyle in effect for the cell.

formattedTypeConverter

A TypeConverterarrow-up-right for the display value type, or null to use the default converter.

valueTypeConverter

A TypeConverterarrow-up-right for the cell value type, or null to use the default converter.

Returns: Objectarrow-up-right. The cell value.

Throws:

Events

ItemsCollectionChanged

EventHandlerarrow-up-right Fired when the collection changes.

Implements

Name
Description

Provides access to the UserData and Tag properties associated to the component implementing this interface.

Defines an object that can invoke a Command.

Last updated

Was this helpful?