语句: this.dataGridView1.CurrentRow.Cells[索引值].Value.ToString();
实例:
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{txtYZXM.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
txtPQ.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
txtLD.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
txtDY.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
txtLC.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
txtFH.Text = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
txtLXDH.Text = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
}