IDataGridViewEditingCell IDataGridViewEditingCell IDataGridViewEditingCell IDataGridViewEditingCell Interface

定义

为允许操作它的值的单元格定义常用功能。Defines common functionality for a cell that allows the manipulation of its value.

public interface class IDataGridViewEditingCell
public interface IDataGridViewEditingCell
type IDataGridViewEditingCell = interface
Public Interface IDataGridViewEditingCell
派生

注解

如由类实现此接口DataGridViewCheckBoxCell派生自DataGridViewCell,并为指定值,而不必寄宿编辑控件提供用户界面 (UI)。This interface is implemented by classes such as DataGridViewCheckBoxCell that derive from DataGridViewCell and provide a user interface (UI) for specifying values without hosting an editing control. 在这种情况下,UI 将显示而不考虑该单元格是否处于编辑模式。The UI in this case is displayed regardless of whether the cell is in edit mode.

其他单元格类型,如DataGridViewButtonCell、 提供 UI,但不是存储用户指定的值。Other cell types, such as DataGridViewButtonCell, provide a UI but do not store user-specified values. 在这种情况下,单元格类型未实现IDataGridViewEditingCell或承载编辑控件。In this case, the cell type does not implement IDataGridViewEditingCell or host an editing control.

显示编辑的单元格类型控制该单元格处于编辑模式时,如DataGridViewTextBoxCell,未实现IDataGridViewEditingCell而是提供实现的伴生类IDataGridViewEditingControlCell types that display an editing control when the cell is in edit mode, such as DataGridViewTextBoxCell, do not implement IDataGridViewEditingCell but instead provide a companion class that implements IDataGridViewEditingControl. 例如,DataGridViewTextBoxCell提供了DataGridViewTextBoxEditingControl派生TextBox控件并实现IDataGridViewEditingControlFor example, DataGridViewTextBoxCell provides a DataGridViewTextBoxEditingControl that derives from the TextBox control and implements IDataGridViewEditingControl. 在此情况下,该单元格EditType属性设置为Type表示编辑控件类型的对象。In this case, the cell EditType property is set to a Type object representing the editing control type. 有关如何实现信息IDataGridViewEditingControl,请参阅如何:Windows 窗体 DataGridView 单元格中承载控件For information about implementing IDataGridViewEditingControl, see How to: Host Controls in Windows Forms DataGridView Cells.

属性

EditingCellFormattedValue EditingCellFormattedValue EditingCellFormattedValue EditingCellFormattedValue

获取或设置单元格的格式化值。Gets or sets the formatted value of the cell.

EditingCellValueChanged EditingCellValueChanged EditingCellValueChanged EditingCellValueChanged

获取或设置指示单元格的值是否已更改的值。Gets or sets a value indicating whether the value of the cell has changed.

方法

GetEditingCellFormattedValue(DataGridViewDataErrorContexts) GetEditingCellFormattedValue(DataGridViewDataErrorContexts) GetEditingCellFormattedValue(DataGridViewDataErrorContexts) GetEditingCellFormattedValue(DataGridViewDataErrorContexts)

检索单元格的格式化值。Retrieves the formatted value of the cell.

PrepareEditingCellForEdit(Boolean) PrepareEditingCellForEdit(Boolean) PrepareEditingCellForEdit(Boolean) PrepareEditingCellForEdit(Boolean)

对当前选定的单元格进行编辑前准备Prepares the currently selected cell for editing

适用于

另请参阅