title: ListView Checkbox Behavior
body: <p>I have a Winform application I'm modifying for a friend.  It has a listview and wants me to add a checkbox to each row and make them mutually exclusive.  So in my testing of how to make it work I found a strange behavior and as hopping someone could tell me what I'm missing.</p>
  
  <p>If I display the List view with no checkbox checked.  When I click right on the checkbox I cannot get it to check, but the row dose get selected. If I click on the item (the name in this case) in the column it does get checked and selected.</p>
  
  <p>No matter where I click on a row, any checkboxes in rows not selected will be uncheck. Here is my little test program. I’m using .NET 4</p>
  
  <pre><code>
  public partial class Form1 : Form {
      public Form1() {
          InitializeComponent();
      }
  
      private void Form1_Load(object sender, EventArgs e) {
          TestListView.Items.Add("Bob");
          TestListView.Items.Add("Ann");
          TestListView.Items.Add("Frank");
      }
  
      void TestListView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) {
          ListViewItem currentItem = TestListView.GetItemAt(e.X, e.Y);
          if (currentItem != null) {
              foreach (ListViewItem item in TestListView.Items) {
                  if (item.Text == currentItem.Text) {
                      item.Checked = true;
                      item.Selected = !currentItem.Selected;
                  }
                  else 
                      item.Checked = false;
              }
          }
      }
  }   
  </code></pre>