System.Windows.Forms.DataGridViewComboBoxEditingControl Class

Represents the hosted combo box control in a System.Windows.Forms.DataGridViewComboBoxCell.

See Also: DataGridViewComboBoxEditingControl Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
public class DataGridViewComboBoxEditingControl : ComboBox, IDataGridViewEditingControl

Remarks

The System.Windows.Forms.DataGridViewComboBoxEditingControl class is a specialized type of System.Windows.Forms.ComboBox that implements the System.Windows.Forms.IDataGridViewEditingControl interface, allowing it to be hosted in a System.Windows.Forms.DataGridViewComboBoxCell when the cell is in edit mode. When a System.Windows.Forms.DataGridViewComboBoxCell is in edit mode, you can retrieve the System.Windows.Forms.DataGridViewComboBoxEditingControl through the DataGridView.EditingControl property of the System.Windows.Forms.DataGridView control.

Handle the DataGridView.EditingControlShowing event to perform custom initialization of the editing control when a cell enters edit mode. To customize the display characteristics of the control, set the properties of the object returned by the DataGridViewEditingControlShowingEventArgs.CellStyle property rather than setting the properties of the control returned by the DataGridViewEditingControlShowingEventArgs.Control property.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0