title: Duplicating Rows In DataGridView
body: <p>The following code loads a tab delimited file into my DataGridView (loads 1 record from the data file). All this works perfectly, however, I need to duplicate this record X amount of times. Once the row is duplicated, I'll need to eventually edit some fields and write to a new file with the rows added.</p>
  
  <p>I'v tried adding rows dynamically but it yells at me saying I can't because the data is bound.</p>
  
  <p>Suggestions?</p>
  
  <pre><code>    Dim file As String = "Temp.txt"
      Dim path As String = "C:\Temp\"
      Dim ds As New DataSet
      Dim tbl As New DataTable
  
      Try
          If IO.File.Exists(IO.Path.Combine(path, file)) Then
              Dim ConStr As String = _
              "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp; _
              path &amp; ";Extended Properties=""Text;HDR=No;FMT=TabDelimited\"""
              Dim conn As New OleDb.OleDbConnection(ConStr)
              Dim da As New OleDb.OleDbDataAdapter("Select * from " &amp; _
              file, conn)
              da.Fill(ds, "TextFile")
          End If
      Catch ex As Exception
          MessageBox.Show(ex.ToString)
      End Try
  
      DataGridView1.DataSource = ds.Tables(0)
  </code></pre>