JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Handling Column Clicks in List Views

In report view (also called details view), list views can display column headers, i.e., the buttons you see in Figure 10.3 above each column. How can you handle column header clicks in a list view? You use the ColumnClick event; here's how that looks in the ListViews example on the CD-ROM, where I'm reporting the column header the user clicked:

Private Sub ListView1_ColumnClick(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles _
    TextBox1.Text = "You clicked column " & (e.Column + 1)
End Sub
Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor