Documentation for this section has not yet been entered.
The ListView.ListViewItemSorter property allows you to specify the object that performs the sorting of items in a System.Windows.Forms.ListView control when the ListView.Sort method is called or when items are added to the list. Note that items are not sorted automatically when their label text changes.
The specified object must be an instance of a class that implements the IComparer interface, which has a single method called Comparer.Compare(object, object).
You can use this property to provide custom sorting, for example, when a column header is clicked in the details view. To do this, create a class that implements the IComparer interface and provides a constructor that accepts the index of a column to sort by. You can then implement a handler for the ListView.ColumnClick event that creates an instance of this class using the index of the clicked column. When you set the ListView.ListViewItemSorter property to the new instance, the System.Windows.Forms.ListView control is automatically sorted using the specified object. Subsequent calls to the ListView.Sort method use the same object.
When you set the value of the ListView.ListViewItemSorter property, the ListView.Sort method is called automatically.