Bind(); int i; i = dataGridView1.SelectedCells[0].RowIndex; txtto.Text = dataGridView1.Rows[i].Cells[5].Value.ToString(); txtsubject.Text = dataGridView1.Rows[i].Cells[1].Value.ToString(); txtfrom.Text = dataGridView1.Rows[i].Cells[8].Value.ToString(); txtdisp.Text = dataGridView1.Rows[i].Cells[3].Value.ToString(); txtdepthide.Text = dataGridView1.Rows[i].Cells[6].Value.ToString(); dateTimePicker1.Value =Convert.ToDateTime(dataGridView1.Rows[i].Cells[7].Value.ToString()); txtrefer.Text = dataGridView1.Rows[i].Cells[4].Value.ToString();
i = dataGridView1.CurrentRow.Index;
txtto.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)