开发者

Gridview row updating error

开发者 https://www.devze.com 2023-03-22 14:59 出处:网络
I have a gridview and have modified it following this article: http://msdn.microsoft.com/en-us/library/aa992036.aspx#Y3473

I have a gridview and have modified it following this article: http://msdn.microsoft.com/en-us/library/aa992036.aspx#Y3473 to allow bulk updates. Whenever I try to update a row in this loop:

For Each r As GridViewRow In GridView1.Rows开发者_Go百科
        If IsRowModified(r) Then GridView1.UpdateRow(r.RowIndex, False)
    Next

I get this error:

You have specified that your update command compares all values on SqlDataSource 'ARDataSource', but the dictionary passed in for oldValues is empty. Pass in a valid dictionary for update or change your mode to OverwriteChanges.

I have no idea what this could be caused by?


Change ConflictDetection from CompareAllValues to OverwriteChanges. SqlDataSource.ConflictDetection Property

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号