Struct TableColumnDefinition
One authored column of a TableMatrix: what its header says, how wide it renders (LayoutSize — the same CSS-style vocabulary a flexbox container's children use), and how its cells align.
Inherited Members
Namespace: Serenity.Ui.Domain.Entities
Assembly: Serenity.Ui.Domain.dll
Syntax
public readonly struct TableColumnDefinition
Constructors
TableColumnDefinition(string, LayoutSize, UiComponentAlignmentType, bool)
Creates a column from its header, width and alignment.
Declaration
public TableColumnDefinition(string headerText, LayoutSize width, UiComponentAlignmentType alignment = UiComponentAlignmentType.LEFT, bool isTranslatingHeaderText = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | headerText | Header text shown when the matrix shows a header row. |
| LayoutSize | width | This column's width along the table's horizontal axis. |
| UiComponentAlignmentType | alignment | Horizontal alignment of this column's cell text. |
| bool | isTranslatingHeaderText | Whether |
Fields
Alignment
Horizontal alignment of this column's cell text.
Declaration
public readonly UiComponentAlignmentType Alignment
Field Value
| Type | Description |
|---|---|
| UiComponentAlignmentType |
HeaderText
Header text shown above this column when the matrix shows a header row.
Declaration
public readonly string HeaderText
Field Value
| Type | Description |
|---|---|
| string |
IsTranslatingHeaderText
Whether HeaderText is treated as a localization key and translated at runtime.
Declaration
public readonly bool IsTranslatingHeaderText
Field Value
| Type | Description |
|---|---|
| bool |
Width
This column's width along the table's horizontal axis.
Declaration
public readonly LayoutSize Width
Field Value
| Type | Description |
|---|---|
| LayoutSize |
Methods
WithWidth(LayoutSize)
Returns a copy of this column with Width replaced, every other field preserved. Used by
the Unity infrastructure's column-width resolver to carry a measured width without dropping the
column's other authored fields. Public (not internal like its Leaderboard precedent) because this
domain entity's own assembly (Serenity.Ui.Domain) sits below the Unity infrastructure
assembly that resolves widths, and grants it no InternalsVisibleTo.
Declaration
public TableColumnDefinition WithWidth(LayoutSize width)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutSize | width |
Returns
| Type | Description |
|---|---|
| TableColumnDefinition |