请问,这句是什么意思
请教,这句是什么意思?string str this.dataGridView1[0, e.RowIndex].Value.ToString()[解决办法]取dat
请教,这句是什么意思?
string str = this.dataGridView1[0, e.RowIndex].Value.ToString();
[解决办法]
取dataGridView单元格的值!
[解决办法]
取dataGridView1中某行某列的值
[解决办法]
获得dataGridView1 cell值的字符串
[解决办法]
string str = this.dataGridView1[0, e.RowIndex].Value.ToString();
取第1列,事件触发行,对应单元格的字符串值
但是上面可能会出错,在不能保证
this.dataGridView1[0, e.RowIndex].Value
为null的前提下,不能用ToString();
[解决办法]
[解决办法]获得dataGridView1 cell值的字符串
[解决办法]你run下不会看结果?
[解决办法]string str = this.dataGridView1[e.RowIndex][0].ToString();
[解决办法][解决办法]`` string str = this.dataGridView1[0, e.RowIndex].Value.ToString();
` 取出dataGridView1中第1行中列索引为e.RowIndex的数值 ``
`` 然后转换为字符串```
``
[解决办法]取当前DataGridVIew所选行的第一个单元格的值,以字符串形式传给str变量