ListView questions

  • Thread starter Thread starter jy836
  • Start date Start date
J

jy836

Firstly, is there a way to find out which column header a user has clicked
on? And secondly, is there then an easy way (or any way, for that matter) to
sort the items by that column (either alphabetically or numerically)?

Thanks in advance.
 
* "jy836 said:
Firstly, is there a way to find out which column header a user has clicked
on?

\\\
Private Sub ListView1_ColumnClick(ByVal sender As Object, ByVal e As ColumnClickEventArgs) Handles ListView1.ColumnClick
If e.Column Is Me.ColumnHeader1 Then
...
ElseIf...Then
...
...
End If
End Sub
///
And secondly, is there then an easy way (or any way, for that matter) to
sort the items by that column (either alphabetically or numerically)?

<URL:http://www.codeproject.com/cs/miscctrl/customheader.asp>

There are many other samples on sorting of items in the Windows Forms
section of Codeproject too.
 

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