title: Cannot add new row after set DataSource in gridview winform
body: <p>I am using EF to get data source for dataGridView, after set DataSource, everything work well but dataGridView was not show <code>add new row</code>. </p>
  
  <p>Code:</p>
  
  <pre><code>LkvDbContext db = new LkvDbContext();
  dataGridView1.DataSource = db.Accounts.ToList();
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/2O6LO.png" alt="cannot add new row"></p>
  
  <p>but if I don't set DataSource there is not issue.</p>
  
  <p><img src="https://i.stack.imgur.com/T9qE5.png" alt="enter image description here"></p>
  
  <p>this is database code:</p>
  
  <pre><code>    public class Account
      {
          [Key]
          public int Id { get; set; }
          public string Username { get; set; }
          public string Password { get; set; }        
          public string Cookiechat { get; set; }
          public int Role { get; set; }
          public int Department { get; set; }
      }
      public class LkvDbContext : DbContext
      {
         public DbSet&lt;Account&gt; Accounts { get; set; }
      }
  </code></pre>
  
  <p>anyone can help me. Thanks</p>