Sorting a column of a listview

  • Thread starter Thread starter Jan Driesen
  • Start date Start date
J

Jan Driesen

Hello,

In Vb6, sorting a column of a listview is like this:

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As
ComctlLib.ColumnHeader)
Me.ListView1.SortKey = ColumnHeader.Index - 1
If Me.ListView1.SortOrder = 0 Then
Me.ListView1.SortOrder = 1
Else
Me.ListView1.SortOrder = 0
End If
Me.ListView1.Sorted = True
End Sub

How do I manage this in vb.net ?

Thanks,

Jan Driesen
 
Hallo Jan,
You can search on the keywords "listview" and "Icomparer" on MSDN or Help,
there you find an example and documentation.
Succes
Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top