DataGridViewCellCollection.Remove(DataGridViewCell) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合中移除指定的儲存格。
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 控制項前,先用此方法修改集合。 一旦你將該列加入控制項,所包含的儲存格數總是與控制項中的欄位數相符,因此此方法不再有用。