LISTVIEW ITEM SELECT IN WINFORM IN C#

Jeet Verma

Total Post:110

Points:776
Posted by  Jeet Verma
C# 
C#
 9968  View(s)
Ratings:
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

  1. shreesh chandra shukla

    Post:105

    Points:735
    Re: ListView Item select in winform in C#

    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];

    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!