Skip to main content
Version: 4.1

DataGridViewComboBoxCell

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

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

public class DataGridViewComboBoxCell : DataGridViewCell

Constructors

Instance member DataGridViewComboBoxCell()

Initializes a new instance of DataGridViewComboBoxCell.

Properties

Instance member AutoCompleteMode

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

Instance member CharacterCasing

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

Instance member DataSource

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

Throws:

Instance member DisplayMember

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: "")

Throws:

  • ArgumentException The DataSource property is not null and the specified value when setting this property is not null or Empty and does not name a valid property or column in the data source.

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

Instance member EditType

Type: Returns the type of the cell's hosted editing control.

Instance member IconMember

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: "")

Throws:

  • ArgumentException The DataSource property is not null and the specified value when setting this property is not null or Empty and does not name a valid property or column in the data source.

Instance member IncrementalSelection

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

Instance member Items

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

Instance member LazyLoading

Boolean: Enables or disables lazy loading mode for the ComboBox cell editor control. (Default: False)

Instance member MaxInputLength

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:

Instance member Sorted

Boolean: Returns or sets if the items in the combo box editor are automatically sorted. (Default: False)

Throws:

  • ArgumentException An attempt was made to sort a cell that is attached to a data source.

Instance member Tools

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

Instance member ValueMember

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: "")

Throws:

  • ArgumentException The DataSource property is not null and the specified value when setting this property is not null or Empty and does not name a valid property or column in the data source.

Instance member ValueType

Type: Returns or sets the data type of the values in the cell.

Instance member VirtualScroll

Boolean: Enables or disables virtual scrolling mode for the ComboBox cell editor control. (Default: False)

Instance member Watermark

String: Returns or sets the text to show when the control is empty.

Methods

Protected member GetFormattedValue(value, cellStyle, valueTypeConverter, formattedTypeConverter)

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

ParameterTypeDescription
valueObjectThe value to be formatted.
cellStyle by referenceDataGridViewCellStyleThe DataGridViewCellStyle in for the cell.
valueTypeConverterTypeConverterA TypeConverter providing custom conversion from the formatted type to the value type, or null if no custom conversion is required.
formattedTypeConverterTypeConverterA TypeConverter providing custom conversion from the value type to the formatted type, or null if no custom conversion is required.

Returns: Object. The value of the cell or null if the cell does not belong to a DataGridView control.

Throws:

Protected member OnDataGridViewChanged()

Called when the element is associated with a different DataGridView.

Protected member OnItemsCollectionChanged(e)

Fires the CollectionChanged event.

ParameterTypeDescription
eEventArgs

Instance member ParseFormattedValue(value, cellStyle, formattedTypeConverter, valueTypeConverter)

Converts a value to the actual cell value.

ParameterTypeDescription
valueObjectThe display value of the cell.
cellStyleDataGridViewCellStyleThe DataGridViewCellStyle in effect for the cell.
formattedTypeConverterTypeConverterA TypeConverter for the display value type, or null to use the default converter.
valueTypeConverterTypeConverterA TypeConverter for the cell value type, or null to use the default converter.

Returns: Object. The cell value.

Throws:

Events

Instance member ItemsCollectionChanged

EventHandler Fired when the collection changes.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
ICommandSourceDefines an object that can invoke a Command.