0
如何將數據從我的文本框(在form1中)傳遞到DataGridView(在form2中)?將數據傳遞給DataGridView
這裏是我使用的代碼。
DataGridView1.ColumnCount = 2
DataGridView1.Columns(0).Name = "Customer"
DataGridView1.Columns(1).Name = "Information"
Dim FNAME As String = Form1.TBFNAME.Text.ToString
Dim row As String() = New String() {"FULLNAME", FNAME}
DataGridView1.Rows.Add(row)
row = New String() {"EMAIL", Form1.TBEADD.Text}
DataGridView1.Rows.Add(row)
row = New String() {"ADDRESS", Form1.TBADDRESS.Text}
DataGridView1.Rows.Add(row)
row = New String() {"CONTACT NO.", Form1.TBCONTACT.Text}
dgv有兩列。和傳遞的數據將出現在第二列,但每當我已經輸入的數據,它仍然在DGV