Tcol
Details a column in the table object.
Attributes
Column
Type
Defines the column's cell type.
The default
value is: text
.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description |
---|---|
text | Default value. Text content. |
button | Button content. |
image | Image content. |
html | HTML content. |
check | A check is displayed if there's any value other than "false" or "0". |
checkbox | A checkbox field. It can edit the column's boolean value in the datasource without opening the edit popup or inline edit. |
switch | A switch field. It can edit the column's boolean value in the datasource without opening the edit popup or inline edit. |
index | The row's index. |
progress | A progress bar. |
selection | Displays a check if the item is selected. This column is displayed only if the table's "Item Selection" attribute is true. |
move | Move the item with drag and drop. |
Hidden
Hides the column so it's not displayed in the table. A column can be hidden, but still have an edit field associated
The default
value is: false
.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description |
---|---|
false | Default value. Visible. |
true | Hidden. |
viewmode | Hidden in view mode, visible in edit mode. |
editmode | Hidden in edit mode, visible in view mode. |
Data
Data Name
Specifies the datasource's column name to be associated with the table's column.
Attribute Values
Value | Description | Example |
---|---|---|
<string> | A valid datasource column's name. | address |
Data Index
Specifies the index in the items array.
The default
value is: auto
.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Attribute Values
Value | Description | Example |
---|---|---|
auto | Default value. Index based on column's index. | |
<int> | A 0-based index. | 0 |
none | Is not associated. |
JSON Value
If true, interprets the cell value as a JSON object. Each key in the JSON object represents a column attribute.
Values specified in the JSON object will extend or override the initial column setup.
Only non-static attributes can be overridden.
E.g. { "type": "button", "action": "command", "buttonlabel": "hi", "style": "blue", "commandname": "hi" }
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. Value is not interpreted as JSON. |
true | Cell value interpreted as JSON. |
Format
Specifies the language-sensitive format type to be applied.
The default
value is: text
.
Attribute Values
Value | Description |
---|---|
number | Numeric value, with optional unit or currency. |
date | Date value. |
time | Time value. |
datetime | Date and time value. |
relativetime | Date and time value. |
time-interval | Time interval value. |
list | List value. |
Data Format
Specifies the data format, which determines how the value is parsed when received (through a UISet) or sent.
The default
value is: extended
.
Attribute Values
Value | Description |
---|---|
extended | Default value. HH:mm:ss.SSSS Extended Format. |
basic | HHmmssSSSS Basic Format. |
timestamp | Unix Timestamp: Seconds since the Unix Epoch (January 1, 1970 00:00:00 GMT). |
Data Format
Specifies the data format, which determines how the value is parsed when received (through a UISet) or sent.
The default
value is: extended
.
Attribute Values
Value | Description |
---|---|
extended | Default value. YYYY-MM-DD ISO 8601 Extended Format. |
basic | YYYYMMDD ISO 8601 Basic Format. |
timestamp | Unix Timestamp: Seconds since the Unix Epoch (January 1, 1970 00:00:00 GMT). |
Number Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Time Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Date Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Datetime Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Relative Time Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
List Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Time Interval Display Format
Specifies the field's format.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Foreign Key
If specified, the column value is interpreted as a foreign key for either a linked datasource or the items attribute.
In datasource mode, cells display the corresponding value from the linked datasource's column specified in the "Label Data Name" attribute.
In list mode, cells display the corresponding value from the list of items specified in the "List" attribute.
In items mode, cells display the corresponding value from the items array, where every item is an array with the first element being the key and the second element being the label.
The default
value is: none
.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description |
---|---|
none | Default value. No foreign key. |
datasource | Datasource foreign key. |
list | List foreign key. |
items | Items foreign key. |
Datasource ID
Specifies the ID of the linked datasource.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description | Example |
---|---|---|
<[Datasource ID]> | A valid datasource ID. | ds_addresses |
Value List
If true, treats the value as a comma-separated list of keys relative to the linked datasource. It shows a comma-separated list of labels, based on the "Label Data Name" attribute.
The default
value is: false
.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description |
---|---|
false | Default value. Treat the value as a single key. |
true | Treat the value as a comma-separated list of keys. |
Label Data Name
Specifies the linked datasource's column name to display instead of the key value.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description | Example |
---|---|---|
<[Datasource Column Name]> | A valid datasource column name. | address |
List
Sets the items. An item with a label "---" (three hyphen-minus characters) is treated as a separator and its value is ignored.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
Value | Description | Example |
---|---|---|
<comma-separated list> | Items specified as a comma-separated list. | item1,item2,item3 |
<array> | Items specified as an array of strings. | ["item1","item2","item3"] |
<array of arrays> | Items specified as an array of arrays. Each item has an array of value and label. | [[1,"label1"],[2,"label2"],[3,"label3"]] |
<array of arrays> | Items specified as an array of arrays. Each item has an array of values that can be recalled from the template attribute. | [[1,"label1","descr1"],[2,"label2","descr2"],[3,"label3","descr3"]] |
Items
Specifies the items.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Cell Style & Format
Width
The column's width.
Columns set to 'auto' width expand or contract to fill the remaining space of the table, after accounting for columns with fixed widths. Each 'auto' column maintains a minimum width of 100 pixels, ensuring consistent visibility and layout.
If the combined width of all columns exceeds the width of the table, the table becomes horizontally scrollable. This ensures that all columns, regardless of their individual or total width, remain accessible to the user.
The default
value is: auto
.
Attribute Values
Value | Description | Example |
---|---|---|
<int> | The column's width in pixels. | 200 |
Fixed Width
Columns of type selection
and move
have a fixed width.
This attribute is static
. Its value can't be changed dynamically with a uiSet command or with a value binding.
Align
Specifies the cell's content alignment.
The default
value is: left
.
Attribute Values
Value | Description |
---|---|
left | Default value. Left. |
center | Center. |
right | Right. |
Background
Specifies the cell's background color.
Attribute Values
Value | Description | Example |
---|---|---|
<html color> | Color in any html accepted format. | #ff0000 |
Column Header
Label
The label displayed in the column header.
The default
value is: =@title:dataname
.
Attribute Values
Value | Description |
---|---|
<string> | A label. |
Icon
An optional icon to be displayed in the column header, before (or in place of) the label.
Attribute Values
Value | Description | Example |
---|---|---|
<image> | An icon image. | icon:mdi#account-multiple |
Column Footer
Summary Label
If true, the footer column will contain a label of the row's content (Total, Average, Minimum or Maximum). If more consecutive columns have summary label set to true, they are merged (can be used to display the whole label if a single column is too narrow)
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. False. |
true | True. |
Summary
Specifies the summary to be displayed on the column footer. Can be one or more values. If there's an active filter, the results are calculated using the filtered rows. If there's a selection, Selecting specific rows will calculate the results using only the selected rows
Attribute Values
Value | Description |
---|---|
none | No summary. |
sum | Show sum of all the displayed column values. |
avg | Show the average value of all the displayed column values. If the column has type "check", show checked/total. |
min | Show the minimum value among the displayed column values. |
max | Show the maximum value among the displayed column values. |
Button Action
Action
Specifies the action performed when clicked/tapped.
The default
value is: none
.
Attribute Values
Value | Description |
---|---|
none | Default value. No action. |
edit | Edits the item. |
delete | Deletes the item. |
duplicate | Duplicates the item. |
command | Sends a command to the server, with the specified name and parameter. |
datapoint | Toggles a datapoint. |
link | Changes page, shows a popup or opens a URL. |
download | Fires a download file request. |
tab | Shows a specified container and hides the other of the same group. |
cameralink | Opens a page with the specified camera address. |
copy | Copies the cell's value to the clipboard. |
Command Name
Specifies the command name that is sent to the server.
If the name starts with $, then the server will automatically set a variable with the same name as the command, containing the command's parameter.
The default
value is: =id
.
Attribute Values
Value | Description | Example |
---|---|---|
<string> | A command name. | |
$[variable name] | A command name that sets a variable. | $myvar |
$[variable name]! | A command name that sets a persistent variable. | $myvar! |
Parameter
If set, specifies the command's parameter value. The default parameter is the key value of the row.
The default
value is: [Row's key value]
.
Repeat
If enabled, the command will be repeated every second. Instead of a single command on the button press event, multiple commands are sent with the following suffixes:
<command name>/down
: on mouse down or touch down events<command name>/repeat
: if the button is still pressed, a repeat command is sent every second<command name>/up
: on mouse up or touch up events, for a short press (less than a second, so no repeat commands have been sent yet)<command name>/stop
: on mouse up or touch up events, for a long press (more than a second, so at least a repeat command has been sent)
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. Repeat mode is disabled. |
true | Repeat mode is enabled. |
Link
If set, specifies the link. The default link is the row's cell value.
Link Target
Specifies where to open the linked URL. Available only for URL links.
The default
value is: _self
.
Attribute Values
Value | Description |
---|---|
_self | Default value. Opens the linked URL in the same window or tab. |
_blank | Opens the linked URL in a new window or tab. |
<string> | Opens the linked URL in a named window or tab. Use this to open multiple links in the same window or tab. |
Datapoint
Specifies a datapoint, to display and control its status.
The default
value is: [Cell's value]
.
Attribute Values
Value | Description | Example |
---|---|---|
[datapoint address] | The datapoint address. | dummy.dimmer.1 |
Feedback
If feedback is enabled, when the action is performed, a loader is displayed until the server responds.
Also the action can't be performed again until the server responds.
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. Feedback is disabled. |
true | Feedback is enabled. |
Confirm
Requires a confirmation before performing the action.
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. No confirmation, the action is performed right away. |
doubleclick | A second click (or touch or enter key) is required to confirm the action. |
popup | A popup is displayed to ask for confirmation. |
Confirm Message
The confirmation message to be displayed if the "confirm" attribute is set to "popup".
Attribute Values
Value | Description | Example |
---|---|---|
<string> | The message to be displayed in the confirm popup. | Are you sure? |
Confirm
Edit Duplicate
If true, opens the edit popup to allow changes before adding the item as new.
The default
value is: true
.
This attribute is experimental
. It might not work properly and it might be modified or removed in a future release.
Attribute Values
Value | Description |
---|---|
true | Default value. Edit the item before adding it as new. |
false | Duplicate the item right away. |
Text
Text
Specifies the text to be displayed in the cell.
The default
value is: [Cell's value]
.
Attribute Values
Value | Description |
---|---|
<string> | A text. |
Template
Defines an HTML template.
The text parameter is split with pipe character (|
) and each part is inserted in the template, replacing the %1;
, %2;
, $3;
, etc. placeholders.
Attribute Values
Value | Description | Example |
---|---|---|
<string> | HTML template. | <b>%1;</b> - %2; |
Selectable
Makes the text selectable.
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. False. |
true | True. |
Auto Links
Detects urls, emails and phone numbers and displays them as hyperlinks. Phone numbers can be: E.164 format, [+]XXX XXX XXXX or [+]XXX-XXX-XXXX.
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. Disabled. |
true | Enabled. |
Button
Copy Text
Specifies the text to be copied in the clipboard when the button is clicked.
The default
value is: [Cell's value]
.
Attribute Values
Value | Description |
---|---|
<string> | A text. |
Button Color
Specifies the button color.
The default
value is: default
.
Attribute Values
Value | Description |
---|---|
default | Default value. Default color. |
primary | Primary color, used to highlight action buttons. |
warning | Warning color, used to highlight warning buttons. |
success | Success color, used to highlight success buttons. |
error | Error color, used to highlight error buttons. |
light | Light color. |
dark | Dark color. |
red,blue,yellow,green,yellow,purple,orange,green | Palette colors. |
custom | Custom color, defined in the "Custom Color" attribute. |
Button Look
Specifies the button's look.
The default
value is: filled
.
Attribute Values
Value | Description |
---|---|
filled | Default value. Filled look, with a solid background. |
clear | Clear look, no background or border. |
outlined | Outlined look, with a solid border. |
glass | Glass look, with a semi-transparent background. |
Button Label
Specifies the button's label.
Attribute Values
Value | Description |
---|---|
<string> | Button's label. |