Of course it will do that since you have
Which is the index of the last row on the DGV. If you want to add a new row, just do thisCode:Dim i = rowCount - 1
And BTW, what's the purpose of declaring the boolean variable good if you're not using it anywhere?Code:Private Sub loadData(ByVal fileLocation As String) Dim fileName = GetFileNameWithoutExtension(fileLocation) Dim outputLocation = System.IO.Path.GetDirectoryName(fileLocation) Dim good = True Files.Rows.Add(Nothing, fileLocation, outputLocation, fileName) End Sub




Reply With Quote