With references to the following URLs
http://www.vb-helper.com/howto_net_listview_sort_clicked_column.html
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q319401
http://www.fryan0911.com/2009/05/vbnet-how-to-sort-listview-by-clicked.html
http://www.devcity.net/Articles/20/1/20020304.aspx
I have decided to make revision and created a sample code for the benefits of others.
Basically, the idea is to create an instance of 'System.Windows.Forms.SortOrder’ and then assign it to the listview’s property of ‘listviewItemSorter’.
To do that 'listviewItemSorter' must be referenced to an object which implements ‘system.collections.iComparer’ and with two parameters.
Download the sample source code (VB.NET 2008 SP1).
http://www.vb-helper.com/howto_net_listview_sort_clicked_column.html
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q319401
http://www.fryan0911.com/2009/05/vbnet-how-to-sort-listview-by-clicked.html
http://www.devcity.net/Articles/20/1/20020304.aspx
I have decided to make revision and created a sample code for the benefits of others.
Basically, the idea is to create an instance of 'System.Windows.Forms.SortOrder’ and then assign it to the listview’s property of ‘listviewItemSorter’.
To do that 'listviewItemSorter' must be referenced to an object which implements ‘system.collections.iComparer’ and with two parameters.
- Clicked column
- Desired sort order
Download the sample source code (VB.NET 2008 SP1).
Comments