Problem: https://dxsearch.devexpress.com/default.aspx?d=15&p=T4%7cP2%7c54&q=OidInitializationMode&page=3 (currently there are about 40 requests on the subject)
All problems fall into the two main categories:
- Inline editing on the Web in the grid, tree list and scheduler (example: B197990). Certain scheduler scenarios are not supported for the OidInitializationMode = OnSaving at all (Q513729);
- Manipulations with aggregated collections depending on new master object or any custom logic on the Oid property (example: Q325791, T191111);
They occur mostly in ASP.NET because data bound control records are identified by their identifiers. Since all your objects have the same Guid.Empty value until they are saved, it is impossible to correctly perform certain operations (e.g., selection, editing, deletion) within the control.
See the linked duplicates for more details.
Proposed/Current solution:
Set BaseObject.OidInitializationMode = OidInitializationMode.AfterConstruction in Project Templates for new XPO solutions to avoid breaking changes for existing users like in New Objects have an Oid.
This should fix all the problems listed in duplicates for NEW users and will NOT affect existing customers.
Refer to the All objects are selected / edited in a nested ListView after creating several aggregated objects without saving the master object ticket to learn how to solve the issue in the current version.
For what its worth, you reference ticket B198984, which was mine. However, I no longer use that approach now that I can use IsNewObject(@This) in my criteria. So I actually set OidInitializtionMode to AfterConstruction these days.