0

im trying to make the listview sort the listview items by column (whichever column was clicked, sort the list based on that column)

in vb6 it was done by:

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
    Static olditem&
    With ListView1
        .SortKey = ColumnHeader.SubItemIndex
        If olditem = .SortKey Then .SortOrder = 1 - .SortOrder
        olditem = .SortKey
    End With
End Sub

can't figure out how to get it done in vb.net

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by jlego
0

i actually did read that earlier, it just seemed a little much just to sort the listview.

i'll give the datagridview a shot, see if i am able to use it.

thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.