Data Table¶
Rows of data in typed columns, with sorting, aggregates and optional paging.
Table widgets · widget type data-table · binds through a data source, $record in cell expressions
Related: Custom Table · Data List · Pagination
Examples¶
// Pointing the table at its records
{$data.orders}
// A computed cell, where $record is the current row
{$record.amount} + {$record.vat}Options¶
| Option | Values | Default | Description |
|---|---|---|---|
| Data source | An expression, e.g. {$data.orders} |
— | The records to display. Without it the widget shows a placeholder |
| Transformation | Steps | None | Select, compute, filter, sort and group applied to the rows before they reach the table |
| Empty text | Any text | No data to show |
Shown when the source returns nothing |
| Column Settings | Per-column settings | — | See below |
| Default sort field / Default sort direction | A field · Ascending · Descending | None | How the table is sorted on first render |
| Selection | Single · Multiple, with a state path | Off | Publishes the clicked row so other widgets can react |
| Pagination | On · Off, with page parameters | Off | Pairs with the Pagination widget |
| Border / Plain header / Resizable / Fixed | On · Off | Varies | Table chrome and column behaviour |
| Scrollable | On · Off | Off | Scrolls inside the widget's own box instead of growing the page |
| Box Style | Sizing and spacing | — | The box around the table |
Column settings¶
| Option | Values | Description |
|---|---|---|
| Field | A record field | What the column shows, and the default header text |
| Content type | Text · Text template · Value expression · HTML template · Elements · Renderer function | How the cell content is produced. Elements renders portal widgets inside the cell, once per row |
| Format type | Number · Percent · Date · Currency · Custom | Formatting applied to the value |
| Custom format | A format string | Used when Format type is Custom — see text formats |
| Sortable | On · Off | Whether the header sorts the rows |
| Width / Col span / Row span | Numbers | Column sizing and cell spanning |
| Aggregate | Sum · Count · Average, with a field, value or alias | Feeds a footer or caption row |
| Select header | On · Off | Puts the selection control in the header |
Notes¶
$recordis the current row inside any cell expression or template- Transformation changes the rows for this table only; the data source itself is untouched
- Turn on Buffered in the advanced options for very large sets — rows are then rendered as they scroll into view
- For merged cells, mixed HTML or a hand-built structure, use Custom Table