How do i put one of those column headers in a listview control, like in Outlook Express, that sorts the column contents??
I know how to sort, so u don't need to write out all of that stuff...
Printable View
How do i put one of those column headers in a listview control, like in Outlook Express, that sorts the column contents??
I know how to sort, so u don't need to write out all of that stuff...
set the View property to 3, then goto the custom properties screen. goto the column headers tab and add the correct header names, when you run it, it'll work!
those two steps arn't working, is there something i'm skipping??
try this in your list view columnclick event
assuming the name of your list view is lstView
the following will toggle the sorting in ascending/descending order
Private Sub lstView_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
With lstView
.SortKey = ColumnHeader.Index - 1
If .SortOrder = lvwAscending Then
.SortOrder = lvwDescending
Else
.SortOrder = lvwAscending
End If
.Sorted = True
End With
End Sub