C#2005 获取DataGridView选中行的值

来源:互联网 发布:淘宝2元充值话费 编辑:程序博客网 时间:2024/05/16 12:38
C#2005 获取DataGridView选中行的值

第一列
String str = this.DataGridView.SelectedCells[0].Value.ToString();
第二列
String str = this.DataGridView.SelectedCells[1].Value.ToString();