Defines common functionality for controls that are hosted within cells of a DataGridView.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
This interface is implemented by controls, such as DataGridViewComboBoxEditingControl and DataGridViewTextBoxEditingControl, that are hosted by corresponding DataGridView cells, such as DataGridViewComboBoxCell and DataGridViewTextBoxCell, when they are in edit mode.
The DataGridView control creates an instance of the editing control type.
The DataGridView control calls the editing control ApplyCellStyleToEditingControl method and passes in the cell's current style. You can implement this method to initialize the appearance of the editing control so that it matches the appearance of the cell.
The DataGridView control calls the editing control PrepareEditingControlForEdit method. You can implement this method to make final adjustments to the editing control, such as selecting the control value.
For more information about implementing , see How to: Host Controls in Windows Forms DataGridView Cells.
Cell types such as DataGridViewCheckBoxCell that provide a user interface (UI) for specifying values without hosting an editing control implement the IDataGridViewEditingCell interface. The UI in this case is displayed regardless of whether the cell is in edit mode.
Other cell types, such as DataGridViewButtonCell, provide a UI but do not store user-specified values. In this case, the cell type does not implement IDataGridViewEditingCell or host an editing control.
The following code example provides an implementation of this interface that derives from DateTimePicker. This example is part of a larger example available in How to: Host Controls in Windows Forms DataGridView Cells.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.