日期:2014-05-20  浏览次数:20763 次

DATAGRIDVIEW 怎么能取到其中的一个单元?
用循环怎么取到?


------解决方案--------------------
this.dataGridView1[行,列]
------解决方案--------------------
//参考:
for (int i = 0; i < dataGridView1.RowCount; i ++)
{
for (int j = 0; j < dataGridView1.Rows[i].Cells.Count; j++)
{
textBox1.Text += dataGridView1.Rows[i].Cells[j].Value;
}
textBox1.Text += "\r\n ";
}