title: How to prevent my gridview from creating additional rows in c#?
body: <p>I try researching this everywhere but it appears when I run my windows form application and display my database. Each it keeps automatically skipping and adding rows.<br>
  Here is a screen shot of my gridview
  <a href="https://i.stack.imgur.com/uSY77.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uSY77.png" alt="enter image description here"></a></p>
  
  <p>Here is also my code where it displays the database when I click a button:</p>
  
  <pre><code>    try
      {
          conn = new MySqlConnection();
          conn.ConnectionString = connstring;
  
          query = "INSERT INTO schedule(name) VALUES(@namevalue)";
          MySqlCommand cmd = new MySqlCommand(query, conn);
          cmd.Parameters.AddWithValue("@namevalue", this.nameEmp.Text);
  
          conn.Open();
  
          cmd.ExecuteNonQuery();
  
  
          MessageBox.Show("Connection Success");
          myadapt = new MySqlDataAdapter();
          string sq = "SELECT * FROM schedule";
          myadapt.SelectCommand = new MySqlCommand(sq, conn);
          tb = new DataTable();
          myadapt.Fill(tb);
  
          BindingSource src = new BindingSource();
          src.DataSource = tb;
  
          dataGridView1.DataSource = src;
  
      }
      catch (MySqlException ex)
      {
          MessageBox.Show(ex.Message);
      }
  }
  </code></pre>