Hi, So i have 2 form, each has 1 datagridview.
In the FORM1, the datagridview contain some product column and user can input the number of product quantities they want to buy.
if user press the "buy" button, i want it to open FORM2, with datagridview containing the list of the product they buy from datagridview in FORM1.
i have tried to use list, assign the value directly, but no luck
For z As Integer = 0 To dataGridView(0).RowCount - 1 //to identify the row
//assign the value directly
Form2.DataGridView1.Rows(0).Cells(0).Value = dataGridView(0).Rows(z).Cells(0).Value
//use list
Dim list = New List(Of Test)
list.Add(New Test(dataGridView(0).Rows(z).Cells(0).Value, dataGridView(0).Rows(z).Cells(3).Value, dataGridView(0).Rows(z).Cells(1).Value))
Form2.DataGridView1.DataSource = list
//this one does not work as well
Dim n As Integer = Form2.DataGridView1.Rows.Add()
DataGridView1.Rows.Item(n).Cells(0).Value = dataGridView(0).Rows(z).Cells(0).Value
DataGridView1.Rows.Item(n).Cells(1).Value = dataGridView(0).Rows(z).Cells(1).Value
DataGridView1.Rows.Item(n).Cells(1).Value = dataGridView(0).Rows(z).Cells(2).Value
nothing works..
can anyone help?