In Chapter 14, you
learned how to create complex types and use them to encapsulate properties
in an entity. As an example, you temporarily encapsulated a number of
StateProvince) of the
Address entity into a complex type called
Figure B-1. The Address entity with its Mail complex property
The chapter looked briefly at data binding when an entity contains a complex type. Complex types may not behave the way you would expect them to in data binding. Therefore, this appendix will take a look at a number of specific data-binding scenarios that you may encounter in your applications.
When you use complex types with the
EntityDataSource “flattens” the properties
within the complex type to make them easily accessible. When configuring
EntityDataSource, you will see
the type, but not the properties. However, when binding controls to the data
source, the properties of the complex type appear as though they were
simply properties of the parent type. You can see this in the screenshot
in Figure B-2.
Figure B-2. The complex type properties automatically flattened
This flattening of the properties is a feature of the ...