Results 1 to 6 of 6

Thread: Sorting lisview (SOLVED)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    68

    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
  •  



Click Here to Expand Forum to Full Width