First user makes a select query on records (using sqldatasource with selectcommand).Mean while Second user update one of the record that is being displayed to first user. Records get updated successfully for second user. Now when First user try to perform delete action on same record (using sqldatasource,DeleteCommand). First user see “[MissingRecordException]: Requested Record cannot be found by key” Exception.
We tried tips from existing thread like assigning datasource on server side on page load , clearing datasource on row delete event and also setting property AutoCRUD="False”. Still we are receiving same error.
I had a similar issue - after spending quite a bit of time on this issue, I discovered that rebinding to a static variable (even though doing another get of the data to it) resulted as in the objectid for the datasource not getting updated so the datagrid wasn't 'truly' recognizing the rebind. Doing a databind() wasn't refreshing the Key. To resolve, I set a local variable to a copy of the updated datasource and did a rebind(). It worked for me and hope this helps you :)!
System.Data.DataSet dNoticesNew = new System.Data.DataSet();
dNoticesNew = dNotices.Copy();
DGNotices.DataSource = dNoticesNew;
DGNotices.DataBind();
Hello,
Thank you for sharing your experience with the community. If you are still experiencing some issues feel free to contact me.