DataGridViewCellCollection.Remove(DataGridViewCell) メソッド

定義

指定したセルをコレクションから削除します。

public:
 virtual void Remove(System::Windows::Forms::DataGridViewCell ^ cell);
public virtual void Remove (System.Windows.Forms.DataGridViewCell cell);
abstract member Remove : System.Windows.Forms.DataGridViewCell -> unit
override this.Remove : System.Windows.Forms.DataGridViewCell -> unit
Public Overridable Sub Remove (cell As DataGridViewCell)

パラメーター

cell
DataGridViewCell

コレクションから削除する DataGridViewCell

例外

この DataGridViewCellCollection を所有する行は、既に DataGridView コントロールに属しています。

cell がコレクション内に見つかりません。

注釈

コントロールに含まれる行を追加する前にコレクションを変更するには、このメソッドを DataGridView 使用します。 コントロールに行を追加すると、その行に含まれるセルの数は常にコントロール内の列数と一致するため、このメソッドは役に立たなくなります。

適用対象

こちらもご覧ください