您的位置:首页 > 移动开发 > Objective-C

winform DataGridView 选择行 获取数据

2011-04-26 14:09 381 查看
  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 object
相关文章推荐