Dim textData As String() = System.IO.File.ReadAllLines(Me.txtSource.Text)
Dim headers As String() = textData(0).Split(","c)
Dim dataTable1 As New DataTable
For Each header As String In headers
dataTable1.Columns.Add(header, GetType(String), Nothing)
Next
For i As Integer = 1 To textdata.length - 1
dataTable1.Rows.Add(textData(i).Split(","c))
Next
Me.DataGridView1.DataSource = dataTable1
Me.Controls.Add(dataGridView1)
======================================================================
I tried to study this codes.. Can anayone help me to understand the for loop..