title: Adding a record in Datagridview Row in Vb.net
body: <p>Hello I have Datagridview in my vb.net form and i want to display the data from the MySQL table to the Datagridview (Dgv) of Vb.net but the problem is when i update or delete an record in Dgv the current record that i fetch is adding more display of the current record. I write this code like this because I'm going to add more function on it, I know i can do this using MySqlDataAdapter and DataSet then fill the datagridview of this code but i use this to add more function, for now how can i update/delete an record without adding more rows that i currently fetch. or doubling the row's </p>
  
  <pre><code>Dim SQL as String = "Select * from employee"
  Dim cmd as MySqlCommand = new MySqlCommad(SQL, connection)
  Dim reader as MysqlDataReader = cmd.executeReader()
  Dim empId, empName, empAddress as String
  with reader.Read
      empId = reader("empId")
      empName = reader("name")
      empAddress = reader("address")
  
  Dim row() As String
  row = new String() {empId, empName, empAddress}
  DataGridView1.Rows.Add(row)
  End While
  reader.close()
  cmd.close()
  </code></pre>
  
  <p>I know the problem is in Rows.Add</p>
  
  <p>Added:
  Currently the function of this is to display the data and when event or button was click this Sub will be called again. with out adding more display.</p>