Create a table
To create a table, drag-and-drop the Table component from the components browser in the sidekick on the adaptive form. By default, the table contains two columns and three rows, including the header row.
About header and body cells
The header cells are text fields. To change the label for a header, right-click the header cell and click Edit. In the Edit dialog, update the label in the Value field and click OK.
The body cells are text boxes, by default. You can replace a body cell with any other adaptive forms component available in the sidekick, such as a numeric box, date picker, or drop-down list.
For example, the first body row in the following table includes text box, date picker, and drop-down list components as cells.
You can merge two or more body cells by selecting the cells you want to merge, right-click, and select Merge. Also, you can split a merged cell by right-clicking it and selecting Split Cells.
Add, delete, move rows and columns
You can add and delete a row or column, and move a row up and down in a table.
Add, delete, or move a row
To add, delete, or move the row, click any cell of the row. open the content browser
-
The Move Up and Move Down operation moves the selected row up and down.
-
The Add Column operation adds a row below of the selected row.
-
The Delete Column operation deletes the selected row.
Double-click the row to configure properties of a row, such as Name, Bind Reference, Repeat Settings, CSS Class.
Add or delete a column
To add or delete a column, click the text cell in the header section, a toolbar opens with the options to add or delete a column:
Add table description
You can add a description of the table to explain how the information is organized that screen readers can interpret and read out. To add the description:
- Select the table and select
- Specify summary in the Accessibility tab.
- Click Done.
Sort columns in a table
You can sort data based on any column in a table in the adaptive form. The values in the column can be sorted in an ascending or descending order.
Sorting can be applied to table columns containing:
- Static text
- Data model object properties
- Combination of static text and data model object properties
To apply sorting on table columns, the table column cells must contain any of the following components: Numeric Box, Numeric Stepper, Date Input Field, Date Picker, Text, or Text Box.
To enable sorting:
-
Select the table and select
-
Select Enable Sorting.
-
Select
-
Switch to the Preview mode to view the output. The table is automatically sorted based on the first column of the table.
-
Click the column header to sort the values based on the column.
A column header with an up arrow represents that the table is sorted based on that column. In addition, the values in the column are displayed in the ascending order.
Similarly, a column header with a down arrow represents that the values in the column are displayed in the descending order.
You can also make changes in the table in the Preview mode and click the column header again to sort the column values.
Set column width for a table
Execute the following steps to set column width for a table:
- In the Content tab, select the Table component and select the Configure (
1.Enter the comma-separated list of values in the Column Width field to specify the proportionate width of each column in the table. For example, for a table that includes 3 columns, specifying 2,4,6 as the value in the Column Width field results in setting the width of columns as 2/12 for first column, 4/12 for second column, and 6/12 for third column. 2/12 as the width for the first column refers to one-sixth of the table width. Similarly, 4/12 sets the second column width as one-third of the table width and 6/12 sets the third column width as half of the table width.
Configure table style
You can define the style for a table by using the Style mode in the page toolbar. Perform the following steps to switch to style mode and edit the table styling
-
In the page toolbar, before Preview, select
-
In the sidebar select table and select the edit button
You can see the styling properties in the sidebar.