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
The problem I had was that I had a DateTime type in the .net framework, but our database field was of DateTime2 type, which is higher precision datatype. So when we would submit changes the date fields of the object vs. the DB was just a few nanoseconds off which would cause the concurrency error. This happened when we migrated to a newer MSSQL version and it converted our DateTime fields to DateTime2.
So in our code where we had:
Obj.DateUpdated = DateTime.Now()
We changed it to:
Obj.DateUpdated = DateTime.Parse(DateTime.Now.ToString())
So check your datatypes, especially your date fields, if you get this error after making an upgrade and or migration.