System.Windows.Forms.ListViewGroupCollection.Remove Method

Removes the specified System.Windows.Forms.ListViewGroup from the collection.

Syntax

public void Remove (ListViewGroup group)

Parameters

group
The System.Windows.Forms.ListViewGroup to remove from the collection.

Remarks

Use this method to remove a group from the collection when you have a reference to the group. Note that removing a group from the ListView.Groups collection does not remove items from the System.Windows.Forms.ListView control.

To remove a group at a particular index, use the ListViewGroupCollection.RemoveAt(int) method instead. To remove all the groups from the collection, use the ListViewGroupCollection.Clear method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0