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();
}
}==========================
试一下...
{
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();
}
}==========================
试一下...
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货