Easy and fast load datagrid from textfile with 100k rows using vb.net
<p>I have a created a program with VB.net, where text file is used to load datagrid, but its very slow, there is a lot of code, when there are many line imports from text file.  </p>

<p>Is there any simpler way to code this, so datagrid loading isn't so slow?</p>

<pre><code>Private Sub Load_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Load.Click

OpenFileDialog1.Filter = "Text Files|*.txt|All Files|*.*"
    OpenFileDialog1.Title = "Select Text File for Path"
    OpenFileDialog1.FileName = "Select File"
    If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.Ok Then
        txttblnm.Text = OpenFileDialog1.FileName
        txtfilenm.Text = System.IO.Path.GetFileName(txttblnm.Text)
        txtfilenm.Text = txtfilenm.Text.Substring(0, txtfilenm.Text.Length - 4)
        Label7.Text = System.IO.Path.GetDirectoryName(txttblnm.Text)
    End If

    If Len(txtfilenm.Text) = 8 And CheckBox1.CheckState = CheckState.Checked Then
        Dim textfiles() = Directory.GetFiles(Label7.Text, "*.txt")
        For Each file As String In textfiles
            Call dgv1_load()
            Call Access_export()
            Call clear_item()
        Next
    ElseIf Len(txtfilenm.Text) &gt;= 9 Then
        MsgBox("Please Load DATA", MsgBoxStyle.Information, "Load Data Error")
        Exit Sub
    End If
End Sub
</code></pre>