This action has been disabled for security reasons. The control cannot serialize complex primary key field values
Error Description
This exception may occur in a grid if the KeyFieldName
property is bound to a complex type field.
Explanation
For security reasons, we limit types that can be specified as primary key fields (the KeyFieldName
property) in grid extensions to the following types:
- Primitive serializable .NET data types (such as Int32, Double, String, Guid).
- Types that implement their own type converter. These types should be marked with the
[TypeConverter]
attribute and implement the bound converter to/from a text representation through a TypeConverter descendant.
All other complex types that are marked as serializable (have the [Serializable]
attribute) are not allowed.
This restriction applies to the following extensions:
Solution
Map the KeyFieldName
property to a data field of the allowed type.