Class TableMatrix
A resolved, engine-free description of a table's shape: its columns, whether a header row renders above
the data, and the data rows themselves. Realizing this onto Unity uGUI is the job of the infrastructure
layer (UnityTablePanel); this type stays free of engine-specific detail.
Inherited Members
Namespace: Serenity.Ui.Domain.Entities
Assembly: Serenity.Ui.Domain.dll
Syntax
public sealed class TableMatrix
Properties
Columns
This table's columns, in render order.
Declaration
public IReadOnlyList<TableColumnDefinition> Columns { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<TableColumnDefinition> |
Empty
A table with no columns, no header row and no data rows.
Declaration
public static TableMatrix Empty { get; }
Property Value
| Type | Description |
|---|---|
| TableMatrix |
Rows
This table's data rows, in order.
Declaration
public IReadOnlyList<TableRow> Rows { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<TableRow> |
ShowsHeaderRow
Whether a header row renders above the data rows. Left to the caller to decide when a header would be meaningless (e.g. an empty board) — the generic table renders whatever this flag says, including a lone header over zero data rows; a caller that wants that suppressed decides so before calling Create(IReadOnlyList<TableColumnDefinition>, bool, IReadOnlyList<TableRow>).
Declaration
public bool ShowsHeaderRow { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Create(IReadOnlyList<TableColumnDefinition>, bool, IReadOnlyList<TableRow>)
Creates a matrix from its columns, header flag, and data rows.
Declaration
public static TableMatrix Create(IReadOnlyList<TableColumnDefinition> columns, bool showsHeaderRow, IReadOnlyList<TableRow> rows)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<TableColumnDefinition> | columns | The columns to render, in render order. |
| bool | showsHeaderRow | Whether a header row renders above the data rows. |
| IReadOnlyList<TableRow> | rows | The data rows to render, in order. |
Returns
| Type | Description |
|---|---|
| TableMatrix |
HeaderCells()
This matrix's header text, one per column, in column order.
Declaration
public IReadOnlyList<string> HeaderCells()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |