I've a entity collection and which is data bind to an UltraGrid, it throw the out of sync exception after saving sometimes, not everytime, I've refetched the entity after saving, I've no ideas why it throw this exception.
Exception: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at SD.LLBLGen.Pro.ORMSupportClasses.EntityPropertyDescriptor2.GetValue(Object component)
at Infragistics.Win.UltraWinGrid.UltraGridRow.GetCellValue(UltraGridColumn column)
Inner Exception: The entity is out of sync with its data in the database. Refetch this entity before using this in-memory instance.
at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.GetCurrentFieldValue(Int32 fieldIndex)
at XXX.SalesOrderDetailEntity.get_ItemNo()