|
-
Jun 11th, 2003, 04:32 AM
#1
Thread Starter
Lively Member
Sorting lisview (SOLVED)
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
Last edited by oxbow123; Jun 12th, 2003 at 07:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|