DataGridViewColumnCollection.IList.Remove(Object) Method

Definition

Removes the first occurrence of the specified object from the collection.

 virtual void System.Collections.IList.Remove(System::Object ^ value) = System::Collections::IList::Remove;
void IList.Remove (object value);
Sub Remove (value As Object) Implements IList.Remove

Parameters

value
Object

The Object to remove from the collection. The value can be null.

Implements

Exceptions

value is not in the collection.

value is null.

The associated DataGridView control is performing one of the following actions that temporarily prevents new columns from being added:

  • Selecting all cells in the control.

  • Clearing the selection.

  • Updating column DisplayIndex property values.

-or-

This method is being called from a handler for one of the following DataGridView events:

Remarks

This member is an explicit interface member implementation. It can be used only when the DataGridViewColumnCollection instance is cast to an IList interface.

Applies to

See also