日期:2014-05-18  浏览次数:20901 次

求助!怎样获取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]