private void dataGridView1_CurrentCellChanged(object sender, EventArgs e)
        {
            DataGridViewRow dgvR = this.dataGridView1.CurrentRow;
            if (dgvR != null)
            {
                this.txtID.Text = dgvR.Cells["dutyid"].Value.ToString();
                this.txtNo.Text = dgvR.Cells["dutyno"].Value.ToString();
                this.txtName.Text = dgvR.Cells["dutyname"].Value.ToString();
            }
        }==========================
试一下...