I have put some code to sort listview detail when columnclick.
I would like to display the sorted column in grey like explorer.
Private Sub ListView1_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles ListView1.ColumnClick
' Determine if the clicked column is already the column that is
' being sorted.
If (e.Column = lvwColumnSorter.SortColumn) Then
' Reverse the current sort direction for this column.
If (lvwColumnSorter.Order = SortOrder.Ascending) Then
lvwColumnSorter.Order = SortOrder.Descending
Else
lvwColumnSorter.Order = SortOrder.Ascending
End If
Else
' Set the column number that is to be sorted; default to ascending.
lvwColumnSorter.SortColumn = e.Column
lvwColumnSorter.Order = SortOrder.Ascending
End If
' Perform the sort with these new sort options.
Me.ListView1.Sort()
'Me.ListView1.Columns.Item(e.Column). = Color.LightGray ?????
End Sub
What the exact code ???
Thanks :p :p
