你的位置:首页 > 软件开发 > ASP.net > 鼠标点击单元格显示在相应文本框中的方法(单元格事件)

鼠标点击单元格显示在相应文本框中的方法(单元格事件)

发布时间:2015-05-26 00:01:09
1 //点击单元格显示此行相应内容 2 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 3 { 4 // 找到鼠标点击的行 5 i ...
 1 //点击单元格显示此行相应内容 2  private void dataget='_blank'>GridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 3     { 4 // 找到鼠标点击的行 5       int index = e.RowIndex; 6       DataGridViewRow currenRow = this.dataGridView1.Rows[index]; 7 //找到每一个单元格的值 8       this.textBox2.Text= currenRow.Cells[0].Value.ToString(); 9       this.textBox4.Text = currenRow.Cells[1].Value.ToString();10       this.textBox5.Text = currenRow.Cells[2].Value.ToString();11       this.textBox3.Text = currenRow.Cells[3].Value.ToString();12       this.textBox6.Text = currenRow.Cells[4].Value.ToString();13 14     }

原标题:鼠标点击单元格显示在相应文本框中的方法(单元格事件)

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录