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 屬性具有 null 的值。The 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 EditingPanel從移除,然後從的Controls集合DataGridView中移除。This method removes the EditingControl from the EditingPanel, and then removes the EditingPanel from the Controls collection of the DataGridView.

適用於

另請參閱