• 浪牛三刀   2016/12/21 16:27:00
  • Row not found or changed
  • 关键字: Linq 绑定GridView
  • 最近在用Linq绑定GridView做自动删除动作时报如下错误:

    Row not found or changed.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.Linq.ChangeConflictException: Row not found or changed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ChangeConflictException: Row not found or changed.]
       System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) +902499
       System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) +372
       System.Data.Linq.DataContext.SubmitChanges() +23
       System.Web.UI.WebControls.LinqToSqlWrapper.SubmitChanges(DataContext dataContext) +9
       System.Web.UI.WebControls.LinqDataSourceView.DeleteDataObject(Object dataContext, Object table, Object oldDataObject) +122
       System.Web.UI.WebControls.LinqDataSourceView.DeleteObject(Object oldEntity) +201
       System.Web.UI.WebControls.QueryableDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +110
       System.Web.UI.WebControls.ContextDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +88
       System.Web.UI.WebControls.LinqDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +35
       System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +84
       System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex) +930
       System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +974
       System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +205
       System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9528682
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
    

大家的回答
  • 还没有人回答这个问题哦,亲,快来帮帮TA吧
  •   我来回答
  • 注册用户登录后才能发表评论,请 登录注册
  • 请您注意

    ·自觉遵守:爱国、守法、自律、真实、文明的原则

    ·尊重网上道德,遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法规

    ·严禁发表危害国家安全,破坏民族团结、国家宗教政策和社会稳定,含侮辱、诽谤、教唆、淫秽等内容的作品

    ·承担一切因您的行为而直接或间接导致的民事或刑事法律责任

    ·您在编程中国社区新闻评论发表的作品,本网站有权在网站内保留、转载、引用或者删除

    ·参与本评论即表明您已经阅读并接受上述条款