title: vb.net 2010 datagridview issues - data only populates the first row
body: <p>I am trying to get my datagridview to display more than one row of data.</p>
  
  <p>Every time I call the program it only writes the 1st line of data in the datagridview instead of adding it to a new row.</p>
  
  <p>I have been looking on the forums for hours but combined with my inexperience I can not understand it. </p>
  
  <p>The following code is in a loop and it reads an xml file each time. The goal is to put the xml data from each file into a new row in the table.</p>
  
  <pre><code>Public Sub ReadData(ByVal filename As String, ByVal file As String)
  Try
  
   DS.ReadXml(filename)
  
   DS.Tables.Add("MyTable")
          With DS.Tables("MyTable")
              .Columns.Add("Title 1")
              .Columns.Add("Title 2")
              .Columns.Add("Title 3")
              .Columns.Add("Title 4")
              .Columns.Add("Title 5")
              .Columns.Add("Title 6")
          End With
  
          Using reader = New StreamReader(filename)
              Dim line As String = reader.ReadToEnd()
              rtb_Subsidary.AppendText(file &amp; vbCrLf)
              DS.Tables("MyTable").Rows.Add(file, "test 1", "test 2", "test 3", "test 4", "test 5", "test 6")
          End Using
  
          With dgv_Lic
              .DataSource = DS.Tables("MyTable")
              .ReadOnly = True
              .ScrollBars = ScrollBars.Vertical
              .AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
              .AutoResizeColumns()
              .RowHeadersVisible = False
              For Each col As DataGridViewColumn In .Columns
                  col.SortMode = DataGridViewColumnSortMode.NotSortable
              Next
          End With
  
  
  
  ...end code
  </code></pre>