Format Data Display
Display Foreign Key as Multiple Columns from Foreign Table

Code Customization
Display Foreign Key as Multiple Columns from Foreign Table
Description:

This customization displays a foreign key in a table as multiple columns from the foreign key table.

Example:
In the Northwind database, there is an Orders table containing a CustomerId field that points to the Customer table. In this example, when you apply this code customization, you need to select the following values for the four variables:

Table With Foreign Key: Orders
Foreign Key: Orders.CustomerId

The above two variables refer to the table that contains the foreign key -- Orders in this example -- not the table that we are referring to.

The next two variables refer to the table/field that contains the fields that you want to display - in this example this would be the Customers table and the two fields from that table.

First Display Column: Customers.ContactName
Second Display Column: Customers.CompanyName

The foreign key will be displayed as a combination of the two columns. You will need to apply this code customization to all tables that have a foreign key that you would like to change. In this example, any other reference to CustomerId in another table will not be changed to the two columns unless you apply the code customization for that table as well.

This customization will be added in:

..\<Application Name>\App_Code\Business Layer\<Table Name>Table.cs

For example: C:\MyApp1\App_Code\Business Layer\OrdersTable.cs

Procedure:

Step 1:  Use this wizard to add code customization.

Step 2:  Build and run the application.

Applies To:

This customization only applies to Show Table or Show Record pages.

Disclaimer:
Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.


  Privacy Statement