TableColumn
ConsoleMonster.Widgets
A table column definition: header, width rules, overflow, priority (which columns hide first when space is short), a presenter for raw values, tone rules and how the column is summarised in subtotals and totals. The same column definitions drive record cards and record views, so a dataset is described once.
Inheritance
- object
- TableColumn
Usage
Explore 107 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 50
- Property Grid.Columns
- Property Table.Columns
- Extension method TableColumn.Aggregate
- Extension method TableColumn.Alignment
- Extension method TableColumn.BelowWidth
- Extension method TableColumn.DimRepeats
- Extension method TableColumn.Flexible
- Extension method TableColumn.Gap
- Extension method TableColumn.Header
- Extension method TableColumn.HeaderAlignment
- Extension method TableColumn.Key
- Extension method TableColumn.MaxLines
- Extension method TableColumn.MaxWidth
- Extension method TableColumn.MinWidth
- Extension method TableColumn.Overflow
- Extension method TableColumn.Placement
- Extension method TableColumn.Presenter
- Extension method TableColumn.Priority
- Extension method TableColumn.RoleRule
- Extension method TableColumn.RoleRules
- Extension method TableColumn.ShortHeader
- Extension method TableColumn.UnknownText
- Extension method TableColumn.Weight
- Extension method TableColumn.Width
- Extension method TableColumn.Wrap
- Method TableColumnFluent.Aggregate
- Method TableColumnFluent.Alignment
- Method TableColumnFluent.BelowWidth
- Method TableColumnFluent.DimRepeats
- Method TableColumnFluent.Flexible
- Method TableColumnFluent.Gap
- Method TableColumnFluent.Header
- Method TableColumnFluent.HeaderAlignment
- Method TableColumnFluent.Key
- Method TableColumnFluent.MaxLines
- Method TableColumnFluent.MaxWidth
- Method TableColumnFluent.MinWidth
- Method TableColumnFluent.Overflow
- Method TableColumnFluent.Placement
- Method TableColumnFluent.Presenter
- Method TableColumnFluent.Priority
- Method TableColumnFluent.RoleRule
- Method TableColumnFluent.RoleRules
- Method TableColumnFluent.ShortHeader
- Method TableColumnFluent.UnknownText
- Method TableColumnFluent.Weight
- Method TableColumnFluent.Width
- Method TableColumnFluent.Wrap
- Property Table<T>.Columns
- Property Tree.ValueColumns
Accepted by parameters 57
- Method Grid.Column
- Constructor GroupedStreamingTable<T1, T2>.GroupedStreamingTable
- Constructor RoleTable.RoleTable
- Method Table.Column
- Extension method TableColumn.Aggregate
- Extension method TableColumn.Alignment
- Extension method TableColumn.BelowWidth
- Extension method TableColumn.DimRepeats
- Extension method TableColumn.Flexible
- Extension method TableColumn.Gap
- Extension method TableColumn.Header
- Extension method TableColumn.HeaderAlignment
- Extension method TableColumn.Key
- Extension method TableColumn.MaxLines
- Extension method TableColumn.MaxWidth
- Extension method TableColumn.MinWidth
- Extension method TableColumn.Overflow
- Extension method TableColumn.Placement
- Extension method TableColumn.Presenter
- Extension method TableColumn.Priority
- Extension method TableColumn.RoleRule
- Extension method TableColumn.RoleRules
- Extension method TableColumn.ShortHeader
- Extension method TableColumn.UnknownText
- Extension method TableColumn.Weight
- Extension method TableColumn.Width
- Extension method TableColumn.Wrap
- Method TableColumnFluent.Aggregate
- Method TableColumnFluent.Alignment
- Method TableColumnFluent.BelowWidth
- Method TableColumnFluent.DimRepeats
- Method TableColumnFluent.Flexible
- Method TableColumnFluent.Gap
- Method TableColumnFluent.Header
- Method TableColumnFluent.HeaderAlignment
- Method TableColumnFluent.Key
- Method TableColumnFluent.MaxLines
- Method TableColumnFluent.MaxWidth
- Method TableColumnFluent.MinWidth
- Method TableColumnFluent.Overflow
- Method TableColumnFluent.Placement
- Method TableColumnFluent.Presenter
- Method TableColumnFluent.Priority
- Method TableColumnFluent.RoleRule
- Method TableColumnFluent.RoleRules
- Method TableColumnFluent.ShortHeader
- Method TableColumnFluent.UnknownText
- Method TableColumnFluent.Weight
- Method TableColumnFluent.Width
- Method TableColumnFluent.Wrap
- Method TableFluent.Column``1
- Method Table<T>.Column
- Method Table<T>.Column
- Extension method Tree.ValueColumn
- Extension method Tree.ValueColumns
- Method TreeFluent.ValueColumn
- Method TreeFluent.ValueColumns
Constructors
Inherited Methods
Properties
public string? ShortHeader { get; set; } #An optional short header used when the full header exceeds its value-driven width.
public int? Gap { get; set; } #Optional cells before this column in an unboxed table; the first visible column has no gap.
public ColumnPlacement Placement { get; set; } #Where evidence moves when this column cannot fit.
public int BelowWidth { get; set; } #Largest content width at which a Below column moves under its row (default 80).
public bool DimRepeats { get; set; } #Whether consecutive repeated values of this key are muted while remaining copyable.
public string? UnknownText { get; set; } #Literal text for missing evidence, or null to keep the ordinary null presenter.
public string? Key { get; set; } #An identifier for the column (a property name), or null to use the header.
public HorizontalAlignment? Alignment { get; set; } #Alignment; null = automatic (right for numeric columns, left otherwise). The header follows it.
public HorizontalAlignment? HeaderAlignment { get; set; } #Optional header alignment independent of the cell values.
public bool Wrap { get; set; } #Whether values may wrap onto several lines when space is short (default true). Setting it maps to TableColumn.Overflow: true is ColumnOverflow.Wrap, false is ColumnOverflow.Never (identifiers keep their width while other columns give way).
public ColumnOverflow Overflow { get; set; } #What happens to values wider than the column: wrap (default), truncate at the end, truncate in the middle, or never shorten.
public int MaxLines { get; set; } #The most lines a wrapped value may use: 0 (the default) follows the table's Table.WrapLines (3 unless changed), TableColumn.Unlimited shows every line. The last line ends with an ellipsis when cut.
public int Priority { get; set; } #The column's importance when the table is too wide: columns with the lowest priority hide first (ties hide from the right). The default is 0. Key columns never hide.
public bool IsKey { get; set; } #Whether this is a key column: it never hides, and it titles the record cards.
public bool Flexible { get; set; } #Whether this column takes spare width when the table expands (the main text column). Flexible columns share it evenly.
public int Weight { get; set; } #This column's share of the spare width when the table expands, relative to other weighted columns (0, the default, takes no weighted share). When no column has a weight, Flexible columns share the spare width, otherwise the free-text columns in proportion to their widths.
public ICellPresenter? Presenter { get; set; } #How raw cell values are shown, or null for automatic (by value type). Markup cells are shown as written.
public IList<RoleRule> RoleRules { get; } #Conditional tone rules for raw values; the first matching rule wins.
public ColumnAggregate Aggregate { get; set; } #How the column is summarised in group subtotals and the totals row.
public string Id { get; } #The identifier: TableColumn.Key, or the header without markup.
Fields
public const int Unlimited #A TableColumn.MaxLines value that shows every line of the column's values, whatever the table's Table.WrapLines.
2147483647Extension Methods
public static TableColumn Aggregate(TableColumn tableColumn, ColumnAggregate value) #Sets TableColumn.Aggregate: How the column is summarised in group subtotals and the totals row.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnAggregate
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Aggregate = value; tableColumn.Aggregate(value);public static TableColumn Alignment(TableColumn tableColumn, HorizontalAlignment? value) #Sets TableColumn.Alignment: Alignment; null = automatic (right for numeric columns, left otherwise). The header follows it.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Alignment = value; tableColumn.Alignment(value);public static TableColumn BelowWidth(TableColumn tableColumn, int value) #Sets TableColumn.BelowWidth: Largest content width at which a Below column moves under its row (default 80).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.BelowWidth = value; tableColumn.BelowWidth(value);public static TableColumn DimRepeats(TableColumn tableColumn, bool value = true) #Sets TableColumn.DimRepeats: Whether consecutive repeated values of this key are muted while remaining copyable.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
tableColumn.DimRepeats = value; tableColumn.DimRepeats(value);public static TableColumn Flexible(TableColumn tableColumn, bool value = true) #Sets TableColumn.Flexible: Whether this column takes spare width when the table expands (the main text column). Flexible columns share it evenly.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
tableColumn.Flexible = value; tableColumn.Flexible(value);public static TableColumn Gap(TableColumn tableColumn, int? value) #Sets TableColumn.Gap: Optional cells before this column in an unboxed table; the first visible column has no gap.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Gap = value; tableColumn.Gap(value);public static TableColumn Header(TableColumn tableColumn, string value) #Sets TableColumn.Header: The header (markup).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Header = value; tableColumn.Header(value);public static TableColumn HeaderAlignment(TableColumn tableColumn, HorizontalAlignment? value) #Sets TableColumn.HeaderAlignment: Optional header alignment independent of the cell values.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.HeaderAlignment = value; tableColumn.HeaderAlignment(value);public static TableColumn Key(TableColumn tableColumn, string? value) #Sets TableColumn.Key: An identifier for the column (a property name), or null to use the header.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Key = value; tableColumn.Key(value);public static TableColumn Key(TableColumn tableColumn, bool value = true) #Sets TableColumn.IsKey: Whether this is a key column: it never hides, and it titles the record cards.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
tableColumn.IsKey = value; tableColumn.Key(value);public static TableColumn MaxLines(TableColumn tableColumn, int value) #Sets TableColumn.MaxLines: The most lines a wrapped value may use: 0 (the default) follows the table's Table.WrapLines (3 unless changed), TableColumn.Unlimited shows every line. The last line ends with an ellipsis when cut.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.MaxLines = value; tableColumn.MaxLines(value);public static TableColumn MaxWidth(TableColumn tableColumn, int? value) #Sets TableColumn.MaxWidth: A maximum width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.MaxWidth = value; tableColumn.MaxWidth(value);public static TableColumn MinWidth(TableColumn tableColumn, int? value) #Sets TableColumn.MinWidth: A minimum width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.MinWidth = value; tableColumn.MinWidth(value);public static TableColumn Overflow(TableColumn tableColumn, ColumnOverflow value) #Sets TableColumn.Overflow: What happens to values wider than the column: wrap (default), truncate at the end, truncate in the middle, or never shorten.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnOverflow
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Overflow = value; tableColumn.Overflow(value);public static TableColumn Placement(TableColumn tableColumn, ColumnPlacement value) #Sets TableColumn.Placement: Where evidence moves when this column cannot fit.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Widgets.ColumnPlacement
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Placement = value; tableColumn.Placement(value);public static TableColumn Presenter(TableColumn tableColumn, ICellPresenter? value) #Sets TableColumn.Presenter: How raw cell values are shown, or null for automatic (by value type). Markup cells are shown as written.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value ConsoleMonster.Presenters.ICellPresenter?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Presenter = value; tableColumn.Presenter(value);public static TableColumn Priority(TableColumn tableColumn, int value) #Sets TableColumn.Priority: The column's importance when the table is too wide: columns with the lowest priority hide first (ties hide from the right). The default is 0. Key columns never hide.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Priority = value; tableColumn.Priority(value);public static TableColumn RoleRule(TableColumn tableColumn, RoleRule item) #Adds an item to TableColumn.RoleRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- item ConsoleMonster.Presenters.RoleRule
- The item.
public static TableColumn RoleRules(TableColumn tableColumn, IEnumerable<RoleRule> items) #Adds items to TableColumn.RoleRules: Conditional tone rules for raw values; the first matching rule wins.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Presenters.RoleRule>
- The items, in order.
public static TableColumn ShortHeader(TableColumn tableColumn, string? value) #Sets TableColumn.ShortHeader: An optional short header used when the full header exceeds its value-driven width.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.ShortHeader = value; tableColumn.ShortHeader(value);public static TableColumn UnknownText(TableColumn tableColumn, string? value) #Sets TableColumn.UnknownText: Literal text for missing evidence, or null to keep the ordinary null presenter.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.UnknownText = value; tableColumn.UnknownText(value);public static TableColumn Weight(TableColumn tableColumn, int value) #Sets TableColumn.Weight: This column's share of the spare width when the table expands, relative to other weighted columns (0, the default, takes no weighted share). When no column has a weight, Flexible columns share the spare width, otherwise the free-text columns in proportion to their widths.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Weight = value; tableColumn.Weight(value);public static TableColumn Width(TableColumn tableColumn, int? value) #Sets TableColumn.Width: A fixed width, or null.
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
tableColumn.Width = value; tableColumn.Width(value);public static TableColumn Wrap(TableColumn tableColumn, bool value = true) #Sets TableColumn.Wrap: Whether values may wrap onto several lines when space is short (default true). Setting it maps to TableColumn.Overflow: true is ColumnOverflow.Wrap, false is ColumnOverflow.Never (identifiers keep their width while other columns give way).
Parameters
- tableColumn ConsoleMonster.Widgets.TableColumn
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
tableColumn.Wrap = value; tableColumn.Wrap(value);