datagridview data transfer from one form to other form
-
hi i am using to form in my application each form have a datagridview i want to transfer all the rows of one datagridview to other form datagridview how?
You can bound both the datagridview with the same datasource.
- Praveen
-
You can bound both the datagridview with the same datasource.
- Praveen
-
You can bound both the datagridview with the same datasource.
- Praveen
i did't bound any datagrid to any datasource but i just added some rows to one datagrid and want to copy it to other form datagrid using the code
RegistrationForm rg = new RegistrationForm();
for (int i = 0; i < dataGridView2.Rows.Count-1; i++)
{
string[] values = { dataGridView2.Rows[i].Cells ["TestID"].Value.ToString(), dataGridView2.Rows[i].Cells["TestName"].Value.ToString(), dataGridView2.Rows[i].Cells["Charges"].Value.ToString(), dataGridView2.Rows[i].Cells["DeliveryDate"].Value.ToString() };
RegistrationForm.dataGridView1.Rows.Add(values);
his.Close();