Databases Reference
In-Depth Information
FIGURE 11.8 TwoColumn entity template.
NOTE
Although it is hard to tell by just looking at the code in the OnLoad method of the
TwoColumn entity template, the Order annotation is still as relevant here as it is in the
Default (single-column) template. Because the GetScaffoldColumn method returns
MetaColumn objects sorted by the Order value, the controls are instantiated and
added to the two PlaceHolder controls in the proper order, as specified in the meta-
data. Keep in mind that both entity templates (single-item forms) and list page
templates use the Order annotation to determine order of controls and columns
respectively. Dealing with a large number of properties can be still difficult when it
comes to the GridView columns.
The approach used to create the TwoColumn entity template can also work for advanced
page layouts that have more “zones” than just two, such as the popular “two columns
with a footer” layout used by many applications including the Work item Form in Visual
Studio Team Explorer. It typically has two columns with small data controls that occupy
the top half of the page and a combined footer area contains big data controls, such as
multiline text boxes, that need to be much wider than a single column would allow.
To support a more complex form layout, you would simply need to create a new entity
template with an appropriate structure of HTML table (or div , if you prefer using CSS)
elements and place a PlaceHolder control in locations where you want the data controls
 
Search WWH ::




Custom Search