DataGridViewCell.DetachEditingControl DataGridViewCell.DetachEditingControl DataGridViewCell.DetachEditingControl DataGridViewCell.DetachEditingControl Method

定义

DataGridView 中移除单元格的编辑控件。Removes the cell's editing control from the DataGridView.

public:
 virtual void DetachEditingControl();
public virtual void DetachEditingControl ();
abstract member DetachEditingControl : unit -> unit
override this.DetachEditingControl : unit -> unit
Public Overridable Sub DetachEditingControl ()

异常

此单元格没有与 DataGridView 关联。This cell is not associated with a DataGridView.

-or- 关联 EditingControlDataGridView 属性的值为 nullThe EditingControl property of the associated DataGridView has a value of null. 例如,当控件不处于编辑模式时,就会出现这种情况。This is the case, for example, when the control is not in edit mode.

注解

DataGridView当前的单元格承载编辑控件并且编辑模式结束时,将调用此方法。The DataGridView calls this method when the current cell hosts an editing control and editing mode ends. EditingControl此方法EditingPanel DataGridView从中删除EditingPanelControls然后从的集合中删除。This method removes the EditingControl from the EditingPanel, and then removes the EditingPanel from the Controls collection of the DataGridView.

适用于

另请参阅