private void WorkerGrid_SelectionChanged(object sender, EventArgs e)
{
this.WorkerGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
txtwid.Text = this.WorkerGrid.CurrentRow.Cells[0].Value.ToString();
this.txtwname.Text = this.WorkerGrid.CurrentRow.Cells[1].Value.ToString();
this.txtwcard.Text = this.WorkerGrid.CurrentRow.Cells[2].Value.ToString();
this.txtwphone.Text = this.WorkerGrid.CurrentRow.Cells[3].Value.ToString();
this.txtaddress.Text = this.WorkerGrid.CurrentRow.Cells[4].Value.ToString();
}
winform DataGridView 选择行 获取数据
最新推荐文章于 2024-01-03 11:17:49 发布