共用方式為


DataGridViewColumnCollection.IList.RemoveAt(Int32) 方法

定義

移除集合中具有指定索引的項目。

 virtual void System.Collections.IList.RemoveAt(int index) = System::Collections::IList::RemoveAt;
void IList.RemoveAt (int index);
abstract member System.Collections.IList.RemoveAt : int -> unit
override this.System.Collections.IList.RemoveAt : int -> unit
Sub RemoveAt (index As Integer) Implements IList.RemoveAt

參數

index
Int32

要刪除之項目的位置。

實作

例外狀況

index 小於零,或大於控制項中的資料行數目減一。

相關聯的 DataGridView 控制項正在執行下列其中一個動作,暫時阻止加入新的資料行:

  • 選取控制項中的所有儲存格。

  • 清除選取。

  • 更新資料行 DisplayIndex 屬性值。

-或- 針對下列其中一個 DataGridView 事件 ,從處理常式呼叫這個方法:

備註

這個成員是明確介面成員實作, 只有在 DataGridViewColumnCollection 執行個體轉換成 IList 介面時,才能使用這個成員。

適用於

另請參閱