1,调用DataTable类,绑定字段就行了
2,借用数据库,保存时将信息插入数据库,DV绑定
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myText() As String
myText = TextBox1.Lines
If DataGridView1.RowCount < myText.GetUpperBound(0) + 1 Then
DataGridView1.RowCount = myText.GetUpperBound(0) + 1
End If
For i = 0 To myText.GetUpperBound(0)
DataGridView1.Item(0, i).Value = myText(i)
Next
End Sub