Hi,
You need to create a class that implements ICompare, then creating an instance of it and assign it to the ListViewSort property.
Here is an example:
public class ListSorter : IComparer public int Compare(object x, object y) //
{
{
ListViewItem Current = (ListViewItem) x;
ListViewItem Comparer = (ListViewItem) y;
// Here you do your comprisons (for example)
//
return Current.SubItems[1].Text.CompareTo(Comparer .SubItems[1].Text);
}
}
Then on your list you assign the sorter when they click the column:
this
.lstAuctions.Sorting = SortOrder.Ascending;Hope this helps
Regards