KeysAutogenerationNonSupportedTypeException Class
An exception that is thrown when a key field doesn’t support automatic value generation
Namespace: DevExpress.Xpo.Exceptions
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Remarks
Only Int32, Int64 and Guid key fields support automatic value generation. This exception is thrown when automatic key generation is enabled for a key property but the property type doesn’t support this feature,
Solution:
- use an integer or GUID property as a key field;
- disable automatic key generation for a property and set an object’s key manually.
To enable/disable automatic key generation for a property use the autoGeneration parameter of the property’s KeyAttribute attribute.