Computed Values
Virtual Calculated Field in Table Record

Code Customization
Virtual Calculated Field in Table Record
Description:

This customization adds a calculated field (e.g. , Age) in a Show Record or Edit Record page. This customization is useful to display the total of two fields or other calculations that involves more than one field.

This customization will be added in:

..\<Application Name>\App_Code\<Table Name>\Show<Table Name>.Controls.cs

For example: C:\MyApp1\App_Code\Customers\ShowCustomers.Controls.cs

Procedure:

Step 1:  In the Application Explorer, select the page where the calculated field will be added.

Step 2:  In Design Mode, select the Fields region in the Record panel.

Step 3:  Click on empty cell and copy the following code into the Cell Editor

<GEN:FieldLabel NAME="MyFieldLabel" />

Click on the second empty cell and copy the following code in the corresponding Cell Editor

<GEN:FieldValue NAME="MyFieldValue" />

Step 4:  Display the Properties dialog and go to the Bindings tab. Bind the "MyFieldValue" FieldValue control to a numeric field in the database table.

Step 5:  Bind the "MyFieldLabel" FieldLabel control to a field in the database table. Set the Label text in the Display tab.

Step 6:  Use this wizard to add code customization.

Step 7:  Build and run the application.

Applies To:

This customization only applies to Show Record or Edit Record controls.

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