Yol gösterme amaçlı bazı bilgileri ilgili DGW lere taşıdım.Sıkışırsanız devamına bakarız.
TXT dosyasını oku butonuna aşağıdaki kodları yapıştırın...
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim BILGI As String
Dim S1 As Integer
Dim objReader As New System.IO.StreamReader("C:\Users\Pc\Desktop\VB.Net.Sorum\VB.Net.Sorum\Siparis.TXT")
S1 = 0
Do While objReader.Peek() <> -1
S1 = S1 + 1
DGW1.Rows.Add(S1, objReader.ReadLine())
Loop
For I = 0 To DGW1.Rows.Count - 1
BILGI = DGW1.Rows(I).Cells(1).Value
If Microsoft.VisualBasic.Left(BILGI, 1) = "B" Then
SIPDGW.Rows.Add("B", Mid(BILGI, 2, 1), Mid(BILGI, 3, 16))
End If
If Microsoft.VisualBasic.Left(BILGI, 1) = "H" Then
HARDGW.Rows.Add("H", Mid(BILGI, 2, 1), Mid(BILGI, 3, 16))
End If
Next
End Sub