日期:2014-05-19  浏览次数:20920 次

如何取出dataGridView的第n行的某个字段值?
我用以下两个方法取值
this.dataGridView2[1,   0].ToString();  
this.dataGridView2.Rows[0].Cells[1].ToString();

但取出结果为 'DataGridViewTextBoxCell   {   ColumnIndex=0,   RowIndex=0   } '一串字符。

请问怎么才能取出dataGridView的第n行的某个字段值?(用列索引及列名两种方法)

------解决方案--------------------
this.dataGridView2[1, 0]..Value.ToString();
this.dataGridView2.Rows[0].Cells[1].Valut.ToString();

这样就OK了 !