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

后端 未结 19 2754
生来不讨喜
生来不讨喜 2020-12-07 22:21

I am trying to delete a selected gridview row using LINQ (No LINQDataSource).

When the selection is changed, the detailsview binding is changed also. I can add a new

19条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 23:10

    I was able to resolve this issue by executing databind() on the gridview and datasource during updatepanel postback.

        protected void UpdatePanel1_Load(object sender, EventArgs e)
        {
            GridView1.DataBind();
            LinqDataSource1.DataBind();
        }
    

    I refresh updatepanel each time my selection index changes and it was able to resolve the conflicts.

    Hope this helps.

提交回复
热议问题