Show TOC

Procedure documentationCreating a Multi-Selection Table Locate this document in the navigation structure

 

You can define a table to enable selection of either single or multiple rows. When a user selects multiple rows and clicks a Submit button, all of the rows are transferred to the data service.

The following procedure describes the settings that you need to define to create a component with a multi-selection table.

Prerequisites

On the Design board, you have added a data service that can receive multiple rows, and a table view that serves as input to the data service.

Procedure

  1. Right-click the Table icon and from the context menu, choose Configure. The Configure task panel is displayed.

  2. Select the Multi-selection checkbox. This enables runtime users to select multiple rows.

  3. Select the line connecting the output port of the table and the data service.

  4. In the Select mode dropdown list in the Configure task panel, choose one of the following:

    • All data rows: Transfers all rows of the table

    • Current data row: Transfers only the table row in which the cursor is located

    • Selected data rows: Transfers only the table rows that are selected by the runtime user

  5. On the Layout board, create a toolbar button to transfer the values of multiple table rows to the data service:

    1. Select the table and in the Configure task panel, select the Create toolbar checkbox.

    2. Create a button with a descriptive name, for example, Submit Selected Rows, and define the action that transfers the table rows to the data service. The action should be the same as the event defined for the connecting line. You may also want to create an additional button, such as Submit All Rows. For more information about creating toolbar buttons, see Creating Toolbars.

Result

At runtime, users can select multiple rows in the table by holding down the Ctrl key and clicking each additional row. They can then submit the values of the selected rows to the data service, using the button defined for this purpose.