![datagridview 如何取得当前行的某个列的值,用this.dataGridView1.CurrentRow.Cells[1].Value.ToString();,第1张 datagridview 如何取得当前行的某个列的值,用this.dataGridView1.CurrentRow.Cells[1].Value.ToString();,第1张](/aiimages/datagridview+%E5%A6%82%E4%BD%95%E5%8F%96%E5%BE%97%E5%BD%93%E5%89%8D%E8%A1%8C%E7%9A%84%E6%9F%90%E4%B8%AA%E5%88%97%E7%9A%84%E5%80%BC%EF%BC%8C%E7%94%A8this.dataGridView1.CurrentRow.Cells%5B1%5D.Value.ToString%28%29%3B.png)
thisdataGridView1CurrentRowCells[0]ValueToString();//这是获取当前行的列
thisdataGridView1SelectedRows[0]Cells[0]ValueToString();//这是获取选中行的列 这里可能会选中多列(要看你设置的选中模式是什么)大体上只有这2种获取列
DataGridView1CurrentRowCells("列标题")Value
DataGridView1CurrentRowCells("列标题")Value
DataGridView1CurrentRowCells("列标题")Value
。。
然后再绑定。。。
以上就是关于datagridview 如何取得当前行的某个列的值,用this.dataGridView1.CurrentRow.Cells[1].Value.ToString();全部的内容,包括:datagridview 如何取得当前行的某个列的值,用this.dataGridView1.CurrentRow.Cells[1].Value.ToString();、在win窗体中DataGridView如何得到当前选中行第一列的值、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)