there is already a Question "Show validation after insert exception" but no fully answers :( for me.
So i had this problem.
Project ( is in MVVM with DataAccess ) and RadDataGrid
In case i add a new Record i catch the Event "RowEditEnded" to a Command with <telerik:EventBinding> in XAML and the
EventOperationType = GridViewEditOperationType.Insert is found.
Then i Save the Data to DB with DataAccess context.SaveChanges() ; and DB is sending Back a Exception DuplicateKeyException
so Commit was not done. But Record was added to the Grid. Now i try to change the Attribute (PK) which raised the violation to a valid one and try the same again. The Event is raised "RowEditEnded" as wanted but now not in "Insert" Mode has switched from "GridViewEditOperationType.Insert" (as it was before on the Record) to "GridViewEditOperationType.Edit" which is different in operation then the Insert a new Record in DB.
So Question is how could i tell the Grid not to do this automatic switch until commit is valid (without exception ) done.
The Record should stay in Insert Mode until Storing was valid.
Or if there is a better solution to handling exceptions on DB side please let me know.
thnx br thomas