Pattern 2: Master-Detail Form on a Single Page

Previous Next

See Also

In this design pattern, a page contains a Results area showing all parent and child records. An automatic query is executed when the page is opened.

To include a master-detail form on a single page:

1. From the Web Designer catalog, open the appropriate (default) info page.
2. From the Controls tab of the catalog, drag the TableDataSource object corresponding with the related page to the main (Page) object in the object tree.

The name of this data source usually starts with: Related.

The top area of the object tree now looks like this:

3. In the ResultGroup, insert a new container control.
4. In this new container, insert a GridControl.
5. For this GridControl, set the Data Source Name property to the name of the related data source.
6. In this GridControl, insert GridCellControls for all columns that you want to display.
7. For these GridCellControls, set the Data Source Item property.
8. You can now improve the layout, delete the SearchGroup control, if desired, or execute an automatic query when a page is opened.
9. Save your changes.


The same result can be achieved by embedding a related page into the info page (as opposed to inserting a TableDataSource object in the main Page object).