locked
Listview in C# using For Loop RRS feed

  • Question

  • I'm new in C# and i want to create this loop, for listview, to count listview items and check all items in one click. can anyone help me?
    Saturday, September 13, 2008 7:22 AM

Answers

  • Code Snippet

    int listCount = listView1.Items.Count;

     

    foreach (ListViewItem item in listView1.Items)

    {

         //Do whatever

    }

     

     

     

    Saturday, September 13, 2008 6:47 PM

All replies

  • Code Snippet

    int listCount = listView1.Items.Count;

     

    foreach (ListViewItem item in listView1.Items)

    {

         //Do whatever

    }

     

     

     

    Saturday, September 13, 2008 6:47 PM
  •  JohnGrove wrote:

    Code Snippet

    int listCount = listView1.Items.Count;

     

    foreach (ListViewItem item in listView1.Items)

    {

         //Do whatever

    }

     

     

     



    Thanx!
    Sunday, September 14, 2008 5:30 AM