title: CRUD Operations using DataGridView, DataTable and DataAdapter - Cannot add new row to DataGridView
body: <p>I'm trying to insert new records into the source table from the C# interface grid view....
  But when I retrieve the records with the buttonclick code shown below... Im getting records in the gridview but no option for inserting new records(screen shot attached).. where as i can update the reocrds from the grid view.</p>
  
  <p>Is there any option or property for enabling the insertion option in the gridview ?</p>
  
  <p>Buttonclickcode :</p>
  
  <pre><code>private void RetrieveRules_button_Click(object sender, EventArgs e)
  {
      this.dataGridView.DataSource = null;
      this.dataGridView.Rows.Clear();
  
  
      SqlCommand cmd1 = con.CreateCommand();
      cmd1.CommandType = CommandType.Text;
      cmd1.CommandText = @" Select TOP 1 * FROM " + schemaName + "[ERSBusinessLogic] ORDER BY ERSBusinessLogic_ID     DESC";
      con.Open();
      cmd1.ExecuteNonQuery();
      DataTable dt = new DataTable();
      SqlDataAdapter DA = new SqlDataAdapter(cmd1);
      DA.Fill(dt);
      dataGridView.DataSource = dt;
      con.Close();
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/SShYi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SShYi.png" alt="Screenshot of the gridview where there is no option for insertion"></a>
  Thanks</p>