The schema definition controls how data is displayed in a Data Table widget. It defines which columns are displayed, how column values are mapped from the data source, the column headers shown to users, and column behaviors such as sorting and drag-and-drop reordering.
You can edit the schema definition using the Edit Schema Definition button under the Data Table pane. It displays the Schema Editor window with detailed definitions of how the data table is presented to the end user.
Basic Column Properties
The basic properties are added to each column in the data table by default. They can be edited in the Schema Editor window.
The following properties are available:
| Property | Description |
|---|---|
| type | Specifies the data type displayed in the column. Supported values are: text, date, json, icon, fileSize, amount, number, boolean. |
| key | Specifies the property in the data source that provides the value displayed in the column. |
| title | Specifies the column header displayed to users. |
| sortable | Determines whether users can sort the table by this column. Valid values are: true or false. |
| draggable | Determines whether users can move the column to a different position using drag-and-drop. Valid values are: true or false. |
Additional Column Properties
Additional properties can be configured depending on the selected column type.
The following properties are available:
| Property | Type | Description |
|---|---|---|
| locale | decimal, integer, amount, date | Specifies the locale used for formatting values. Use an ICU locale code such as en-US, en-GB, or de-DE. |
| digitsInfo | decimal, integer, amount, date | Specifies the number format used for numeric values, including minimum and maximum decimal places. |
| decimalConfig | decimal | Defines formatting options for decimal values, including locale and digitsInfo. |
| currencyConfig | amount | Defines formatting options for currency values, including:
|
| dateConfig | date | Defines formatting options for date values, including:
|
The following is an example of a schema definition of a table with four columns:
[
{
"type": "decimal",
"key": "id",
"title": "No",
"sortable": true,
"draggable": true
},
{
"type": "date",
"key": "creation_date",
"title": "Creation date",
"sortable": true,
"draggable": true,
"dateConfig": {
"locale": "en-GB",
"format": "full",
"tooltipFormat": "medium"
}
},
{
"type": "decimal",
"key": "people",
"title": "Numbers of interested people",
"sortable": true,
"draggable": true,
"decimalConfig": {
"digitsInfo": "1.0-0",
"locale": "pl-PL"
}
},
{
"type": "amount",
"key": "cost",
"title": "Cost of maintenance",
"sortable": true,
"draggable": true,
"currencyConfig": {
"code": "EUR",
"digitsInfo": "2.2-2",
"display": "€",
"locale": "de-DE"
}
}
]
In this example, the schema defines four columns and applies type-specific formatting for dates, decimal values, and currency values.