DataGridViewCell.IsInEditMode 属性

定义

获取一个值,该值指示此单元格当前是否处于编辑状态。Gets a value indicating whether this cell is currently being edited.

public:
 property bool IsInEditMode { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsInEditMode { get; }
member this.IsInEditMode : bool
Public ReadOnly Property IsInEditMode As Boolean

属性值

如果该单元格行处于编辑模式,则为 true;否则为 falsetrue if the cell is in edit mode; otherwise, false.

属性

异常

包含该单元格的行是共享行。The row containing the cell is a shared row.

注解

当您直接使用单元实例时,此属性很有用。This property is useful when you are working directly with cell instances. 此外,还可以使用 DataGridView.IsCurrentCellInEditMode 属性。Alternatively, you can use the DataGridView.IsCurrentCellInEditMode property. 你还可以处理 DataGridView.CellBeginEdit 事件,以确定用户何时进入编辑模式。You can also handle the DataGridView.CellBeginEdit event to determine when the user enters edit mode.

适用于

另请参阅