Databases Reference
In-Depth Information
When specifying order numbers explicitly, give yourself a little room by starting with
appropriate gaps between neighboring properties. In the example just shown, the
FirstName and LastName properties that sit next to each other have a gap of 10 in their
order numbers. If you need to insert another property, perhaps the MiddleInitial ,
between them in the future, you will be able to do it without having to renumber all
properties. Start with a gap of 100 for larger entities that have 20 or more properties. This
allows you to move entire groups of properties without renumbering. When the entity
design stabilizes, you can either renumber the properties to have a uniform gap or create a
custom entity template and remove order numbers from the metadata entirely.
All properties with an explicit display order are displayed first. Properties that do not have
DisplayAttribute or don't have the Order property specified are displayed at the end of
the list. This logic is currently implemented by giving properties a default order of 10,000.
Keep this in mind when working with large entities—you don't want your explicit order
numbers to exceed this number.
Even though gaps allow you to change the order of properties on dynamic pages without
having to renumber all of them, it is still a good idea to have the property order in the
actual source file match the order of their order numbers. This makes it easier to under-
stand how the dynamic page will look and make maintaining order numbers simpler.
Configuring Appearance of Labels
In custom forms, the text elements and labels that appear on pages are specified explicitly
in their markup. In dynamically generated pages, Dynamic Data uses the internal name of
entities and their properties by default. When the internal name does not match what you
want to appear on screen, your first choice should be to adjust the internal name in the
entity model. For instance, if your entity model has a Customer entity, such as the one
from the Northwind Traders sample shown in Figure 11.1, you might have properties such
as ContactName and CompanyName that use PascalCase or another naming convention to
concatenate multiple words into a single identifier.
FIGURE 11.1 Customer entity in Entity Designer.
 
 
Search WWH ::




Custom Search