System.Windows.Forms.ListView.Clear Method

Removes all items and columns from the control.

Syntax

public void Clear ()

Remarks

You can use this method to remove all items and columns from the System.Windows.Forms.ListView control without having to call the individual Clear methods from the System.Windows.Forms.ListView.ColumnHeaderCollection and System.Windows.Forms.ListView.ListViewItemCollection classes.

Note:

The ListView.Clear method does not clear ListView.Groups specified for the System.Windows.Forms.ListView control. To clear ListView.Groups call ListViewGroupCollection.Clear.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0