Home > DeveloperSection > Forums > ListView Item select in winform in C#
Jeet Verma
Jeet Verma

Total Post:110

Points:776
Posted on    July-17-2013 4:03 AM

 C# C# 
Ratings:


 1 Reply(s)
 6846  View(s)
Rate this:
Hi developers!

I want to select item in a ListView upon clicking. I also want to know what I clicked. I work on winforms with c#.I also want to know How I can clicking the all row?

Thanks in advance



shreesh chandra shukla
shreesh chandra shukla

Total Post:105

Points:735
Posted on    July-17-2013 8:26 AM

Solution!

Just handle the Click event on the list and use the ListView.SelectedItems property to get what items are selected:

private void listView1_Click(object sender, EventArgs e)

{

    var firstSelectedItem = listView1.SelectedItems[0];

}


Don't want to miss updates? Please click the below button!

Follow MindStick