Selected Row Handling

Handle Selected Record on a Button Click

Code Customization
Handle Selected Record on a Button Click
Description:

It is often useful to call custom application logic when a row is selected in a table control in your application:

  • Pass the total of two fields in a selected record as a URL parameter.

  • Display totals of multiple fields in another field.

  • Modify fields in a selected record.

This example sets a total of two fields in another field when a button is clicked within a table row. The specific row is determined and the text is concatenated from two field values in the selected record.

This customization will be added in:

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

For example: C:\MyApp1\App_Code\Orders\ShowOrdersTable.controls.cs

Procedure:

Step 1:  In Layout Editor, select the Buttons region of a table control. Then, drag a Button(Themed) control from the GEN Tab in the Toolbox and place it next to the Export button.

Step 2:  Select Tools, Properties... to display the Properties dialog. Select the newly added button control.

In the Display tab, set these properties:

Property

Setting

Button text

myButton

In the Bindings tab, set these properties:

Property

Setting

Action

Custom

Enable client side validation

Checked

Finally, click OK to close the Properties dialog.

Step 3:  Use this wizard to add code customization.

Step 4:  Build and run the application.

Note:

This customization is applicable only to a show or editable table control.

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.

Terms of Service Privacy Statement