读书人

!怎样获取dataGridView用户选中的行

发布时间: 2012-04-08 14:38:30 作者: rapoo

求助!怎样获取dataGridView用户选中的行
怎么通过获取dataGridView用户选中的行来向已有的数据库更新相对行的图像信息?就是现在我不知道通过什么方法来写数据更新的语句来更新相应行。

[解决办法]
this.DataGridView1.SelectedRows[0]
[解决办法]
this.DataGridView1.SelectedRows[0]
[解决办法]
获取选中行的cell信息啊,拼接sql语句啊
[解决办法]
string str1 = "update Student set StudentPic = @picx where StudentNum=‘"+this.dataGridView1[0, rowindex].Value.ToString+“‘”;
[解决办法]
ds.Tables["Student"].Rows[0][0]

读书人网 >C#

热点推荐