private void dataGridView1_CellContentClick_2(object sender, DataGridViewCellEventArgs e) { Form_Distributor myForm = new Form_Distributor(); myForm.textName.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString(); myForm.textaddress.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString(); myForm.textlandmark.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString(); myForm.textcity.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); myForm.comboboxstate.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString(); myForm.textzipcode.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString(); myForm.textdistributor_id.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString(); myForm.textphone.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString(); myForm.textemail.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString(); myForm.textmobile_no.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString(); myForm.textfax_no.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString(); myForm.textnotes.Text = dataGridView1.CurrentRow.Cells[11].Value.ToString(); myForm.ShowDialog(); }
private void distributorToolStripMenuItem1_Click(object sender, EventArgs e) { Form_Distributor f1 = new Form_Distributor(); f1.Show(); }