
Logical sorting in List View (date and/or time)
Here's a sample that should help...
Sorting ListView ListItems Using Callbacks
http://www.mvps.org/vbnet/index.html?code/callback/lvsortcallback.htm
--
Ken Halter
MS-MVP-VB
http://www.vbsight.com
Please respond only to the newsgroups so all can benefit.
Besides.. I check my email only once a week :-)
Quote:
> All,
> It is easy to sort fields in listview by clicking the columns. But if the
> values of the cells are dates
> how to do that? Sorting works regarding ASCII, not logical like date or
> time....
> Private Sub ListView1_ColumnClick(ByVal ColumnHeader As
> MSComctlLib.ColumnHeader)
> ListView1.SortKey = ColumnHeader.Index - 1
> If ListView1.SortOrder = lvwAscending Then
> ListView1.SortOrder = lvwDescending
> Else
> ListView1.SortOrder = lvwAscending
> End If
> ListView1.Sorted = True
> End Sub