title: Unable to edit any columns in my C# DataGridView - would anyone know why?
body: <p>I'm trying to enabled editing for a number of columns in my DataGridView. Now, before anyone suggestions I should read the <a href="http://msdn.microsoft.com/en-us/library/yztkd864.aspx" rel="nofollow">MSDN article: How to: Specify the Edit Mode for the Windows Forms DataGridView Control</a>, I already have.</p>
  
  <p>In summary (and I quote):</p>
  
  <ul>
  <li>The underlying data source supports editing.</li>
  <li>The DataGridView control is enabled.</li>
  <li>The EditMode property value is not EditProgrammatically.</li>
  <li>The ReadOnly properties of the cell, row, column, and control are all set to false.</li>
  </ul>
  
  <p>All of that is simple and common sense. I've confirmed that the <code>Enabled = true</code>. I've confirmed that the <code>EditMode</code> is <code>EditOnKeystrokeOrF2</code> I've confirmed that all the columns (except one) are <code>ReadOnly = false</code>.</p>
  
  <p>What I find interesting is the first line:-</p>
  
  <blockquote>
    <blockquote>
      <p>The underlying data source supports editing.</p>
    </blockquote>
  </blockquote>
  
  <p>Now, what I'm doing is the following, to bind the data to the DGV :-</p>
  
  <pre><code>// Grab all the Foos.
  var foos = (from x in MyRepository.Find()
              select new
                        {
                            x.Foo1,
                            x.Foo2,
                            ...
                            x.FooN
                         }).ToList();
  
  // Now lets bind this result to the GridView.
  dataGridView2.DataSource = foos;
  </code></pre>
  
  <p>Which I thought was the right way to do things..</p>
  
  <p>What i was planing on doing was, when the cell is changed and the user then <em>leaves</em> the cell, that's where I was planning on grabbing the data that was just changed (figure this out manually) and then manually update the DB.</p>
  
  <p>Is this the right way to do things?</p>