System.Windows.Forms.ListViewGroupCollection.Insert Method

Inserts the specified System.Windows.Forms.ListViewGroup into the collection at the specified index.

Syntax

public void Insert (int index, ListViewGroup group)

Parameters

index
The index within the collection at which to insert the group.
group
The System.Windows.Forms.ListViewGroup to insert into the collection.

Remarks

Use this method to insert an existing System.Windows.Forms.ListViewGroup at a particular index within the collection.

You cannot add a System.Windows.Forms.ListViewGroup to the collection more than once. When you call the ListViewGroupCollection.Insert(int, ListViewGroup) method using a group that is already in the collection, the insertion simply fails. Use the ListViewGroupCollection.Contains(ListViewGroup) method before the insertion to determine whether a particular group is already in the collection. To reposition a group within the collection, you must first remove it, and then insert it at the desired index.

Requirements

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