Defining a Datagrid column

When a Datagrid component is first added to the workspace, column headers are automatically given generic names (Column 1, Column 2, and so on). To make the column headers more useful, you likely want to rename them.

In addition, for a Datagrid to be useful, you must tell App Builder where to find the contents for each column, whether to allow users to select or alter the contents of cells, and what format to apply to the contents of each cell in a column.

  1. In the workspace, select the Datagrid component.
  2. In the Properties panel, select the Content tab.
  3. Click to expand the Columns option.
  4. In the list of columns, click the name of the column you want to define.
  5. Use the Edit Datagrid Column dialog box to make the settings for the column:
    1. In the Name field, type the name of the column as you want it to appear in the header row.
    2. Click to expand the Source Field section.
    3. Use the Value field to select the desired source for the column.
    4. Click to expand the Options section.
    5. Set the Options as desired:
      • Editable - This option determines whether users can edit the contents of cells in this column. To make the column cells read-only, clear this check box.
      • Resizable - This option determines whether users can change the size of the Datagrid. To prevent users from resizing the Datagrid, clear this check box.
      • Sortable - This option determines whether users can sort the rows of columns by clicking inside the header of one column. For example, to sort the rows alphabetically by the contents in Column 1, users can click inside the column header, and rows are sorted in alternating ascending/descending order.
    6. Click to expand the Formatter section.
    7. From the list of possible formats (Type), select the one to use as the default format for that column's contents.

      Depending on the Type you select, you might be prompted for additional criteria.

    8. Optionally, to create a summary row for a column with numeric values, expand the Summary Row section, and make these settings:
      • Enable - When selected, this option causes a summary row to be created for the column. Otherwise, no summary row is created or displayed.
      • Text - This option specifies the text to display before the summary total; for example: Total: 
      • Text Placement - Select whether to display the text before the number or after the number. For example, do you want it to display as "Total: 122" (Before) or "122 Total" (After)?
    9. Optionally, to allow one property value to display in place of a specified property value, expand the Substitute Value section, and make these settings:
      • Enable - When this option is selected, the other Substitute Value settings take effect. Ohterwise, any values in the other settings are ignored.
      • Data Service - From the drop-down list, select the data service to serve as the source of the column display. This data service must contain both the property for the Source and the property for the Display Value.
        Note: You can use only data services that do not use input parameters.
      • Source - From the drop-down list, select the property to use as the source for the data.
      • Display Value - From the drop-down list, select the property to use for the display of the specified source data.
  6. Click Save.