开发者

Gridview row updating error

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜