private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex==2)
{
textBox1.Text = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
//textBox1.Text = (string)(this.dataGridView1.Rows[e.RowIndex].Cells[2] as DataGridViewComboBoxCell).Value.ToString();
}
if (e.ColumnIndex==1)
{
textBox1.Text = "第二行的";
}
}
datagridview编辑后需要点其他位置,才能在textbox显示出来
博客提到DataGridView编辑数据后,需点击其他位置,数据才会在TextBox中显示出来,聚焦于信息技术中数据显示交互的问题。
470

被折叠的 条评论
为什么被折叠?



