Occurs when the user clicks a column header within the list view control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
For more information about handling events, see Handling and Raising Events.
The following code example creates a form that contains a ListView control that manually sorts items when a column in the ListView control is clicked. The example defines a class called ListViewItemComparer that implements the System.Collections.IComparer interface that performs the ListViewItem comparison. The example creates an instance of ListViewItemComparer and uses it to set the ListViewItemSorter property of the ListView control. The Sort method call in the event handler uses the methods defined in ListViewItemComparer to perform the sort of items, based on the column that is clicked.
Available since 1.1