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 之前,请使用此方法更改集合。 将行添加到控件后,它包含的单元格数始终与控件中的列数匹配,因此此方法不再有用。

适用于

另请参阅