ListViewGroupCollection.Remove(ListViewGroup) Method

Definition

Removes the specified ListViewGroup from the collection.

C#
public void Remove(System.Windows.Forms.ListViewGroup group);

Parameters

group
ListViewGroup

The 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 ListView control.

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

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also