Class DataColumnRegistration<TItem>
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
Describes how a single column is rendered and behaves inside a data collection.
public sealed class DataColumnRegistration<TItem>
Type Parameters
TItem
- Inheritance
-
objectDataColumnRegistration<TItem>
Constructors
DataColumnRegistration()
public DataColumnRegistration()
Properties
Aggregate
Aggregate function rendered in the footer cell of this column. The aggregate runs against the full filtered set (not just the visible page) so the total reflects the result of the user's filters.
public AggregateFunction Aggregate { get; set; }
Property Value
AggregateFormat
Optional System.IFormattable format applied to the aggregate value. Falls back to Format when not set so consumers don't have to repeat their currency / percentage format strings.
public string? AggregateFormat { get; set; }
Property Value
- string
AggregateLabel
Prefix label shown next to the aggregate value (e.g. "Total: ",
"Avg: "). When null the column renders the
aggregate value alone.
public string? AggregateLabel { get; set; }
Property Value
- string
Align
Horizontal alignment for the column's header and cells.
public ColumnAlign Align { get; set; }
Property Value
CellClass
Extra CSS class applied to every cell in the column.
public string? CellClass { get; set; }
Property Value
- string
CustomAggregate
Custom aggregate delegate invoked when Aggregate is Custom. Receives the filtered items and returns the value to render (formatted via AggregateFormat when applicable).
public Func<IEnumerable<TItem>, object?>? CustomAggregate { get; set; }
Property Value
- Func<IEnumerable<TItem>, object>
CustomComparer
Optional comparer used when sorting by this column.
public Func<TItem, TItem, int>? CustomComparer { get; set; }
Property Value
- Func<TItem, TItem, int>
CustomFilter
Optional predicate used to evaluate filter matches for the column.
public Func<TItem, string, bool>? CustomFilter { get; set; }
Property Value
- Func<TItem, string, bool>
EditTemplate
Optional custom editor fragment rendered while a cell is in edit mode. Receives the row item. When null, the grid picks a default input primitive based on the value type (string → text, numeric → number, date → date, bool → checkbox). Override for cases the auto-resolver can't handle (enum dropdowns, lookup pickers, etc.).
public RenderFragment<TItem>? EditTemplate { get; set; }
Property Value
- RenderFragment<TItem>
Editable
When true and the parent grid is in an inline-edit mode, the
column participates in editing — cells render an input on activation instead of
the static template. Requires ValueSetter to be non-null (auto-derived
from a writable Property) or a custom EditTemplate.
public bool Editable { get; set; }
Property Value
- bool
FilterMode
Filter category for the column. Drives which input type (type=text /
type=number / type=date) and which operator dropdown the grid
renders when ShowColumnFilters=true. Defaults to
Text.
public ColumnFilterMode FilterMode { get; set; }
Property Value
Filterable
When true, the column participates in free-text filtering.
public bool Filterable { get; set; }
Property Value
- bool
Format
Optional format string applied to System.IFormattable values.
public string? Format { get; set; }
Property Value
- string
Freeze
Pin side for the column. Defaults to None. Frozen
columns require an explicit Width in pixels so the grid can
compute cumulative left / right offsets for adjacent frozen peers.
public ColumnFreeze Freeze { get; set; }
Property Value
Header
Header label rendered when no HeaderTemplate is provided.
public string? Header { get; set; }
Property Value
- string
HeaderClass
Extra CSS class applied to the header cell.
public string? HeaderClass { get; set; }
Property Value
- string
HeaderTemplate
Custom render fragment used in place of Header.
public RenderFragment? HeaderTemplate { get; set; }
Property Value
- RenderFragment
MaxWidth
Upper bound (in pixels) the resize drag will clamp to. 0 (default) means
no upper limit — the column grows freely.
public double MaxWidth { get; set; }
Property Value
- double
MinWidth
Lower bound (in pixels) the resize drag will clamp to. Defaults to 48 so a
user can't shrink a column below the typical icon + padding minimum.
public double MinWidth { get; set; }
Property Value
- double
Resizable
When true, the grid renders a drag handle at the trailing edge
of this column's header so the user can resize the column with pointer events.
Requires BOBDataGrid.Resizable to also be on.
public bool Resizable { get; set; }
Property Value
- bool
Sortable
When true, the column header acts as a sort affordance.
public bool Sortable { get; set; }
Property Value
- bool
Template
Cell render template receiving the row item.
public RenderFragment<TItem>? Template { get; set; }
Property Value
- RenderFragment<TItem>
Validator
Optional validator invoked on every cell commit when the column is editable. Receives the row item and the proposed value (already coerced to the property type via the column's setter pipeline). Returns the error message to surface in the cell's tooltip when validation fails, or null to allow the commit. The grid prevents the commit and keeps the editor open on failure.
public Func<TItem, object?, string?>? Validator { get; set; }
Property Value
- Func<TItem, object, string>
ValueSelector
Selector used to project the cell value from the row item.
public Func<TItem, object?>? ValueSelector { get; set; }
Property Value
- Func<TItem, object>
ValueSetter
Setter used by inline-edit mode to write the user's input back to the row item.
Derived from the column's Property expression when the body is a member
access against a writable property. null when the column has
no settable property (e.g. computed columns or read-only projections) — the grid
renders such columns as non-editable even if Editable is on.
public Action<TItem, object?>? ValueSetter { get; set; }
Property Value
- Action<TItem, object>
Visible
When false, the column is registered but not rendered.
public bool Visible { get; set; }
Property Value
- bool
Width
Optional explicit column width (any valid CSS length).
public string? Width { get; set; }
Property Value
- string