CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    121

    List View Click event

    Whenever a user clicks on a listview, entire row is selected.

    How can I get at the row number they selected and the text in the rows?

  2. #2
    Join Date
    May 2002
    Posts
    121
    private void listView1_DoubleClick(object sender, System.EventArgs e)
    {
    for (int i = 0; i < listView1.SelectedItems.Count; i++)
    {
    ListViewItem nextItem = listView1.SelectedItems[ i ];
    // do what you need to do with nextItem
    }
    }

    easy!

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

Featured