Skip to content

DataTableColumnDirective

declare class DataTableColumnDirective<TRow extends Row>

Inputs

bindAsUnsafeHtml

bindAsUnsafeHtml = input<boolean>()

canAutoResize

canAutoResize = input<boolean | undefined>()

Whether the column can automatically resize to fill extra space. Default value: true.

cellTemplateInput

cellTemplateInput = input<TemplateRef<CellContext<TRow>> | undefined>()

Template used to render body cells.

checkboxable

checkboxable = input<boolean>()

Whether the column displays a selection checkbox. Only applies when selection mode is checkbox.

draggable

draggable = input<boolean | undefined>()

Whether the column can be dragged to reorder it. Default value: true.

flexGrow

flexGrow = input<number | undefined>()

Grow factor relative to other columns. Available extra width is distributed proportionally according to all columns' flexGrow values. Default value: 0.

frozenLeft

frozenLeft = input<boolean>()

Whether the column is frozen to the left. Default value: false.

frozenRight

frozenRight = input<boolean>()

Whether the column is frozen to the right. Default value: false.

ghostCellTemplateInput

ghostCellTemplateInput = input<TemplateRef<void> | undefined>()

headerCheckboxable

headerCheckboxable = input<boolean>()

Whether the header displays a selection checkbox. Only applies when selection mode is checkbox.

headerTemplateInput

headerTemplateInput = input<TemplateRef<HeaderCellContext> | undefined>()

Template used to render header cells.

isTreeColumn

isTreeColumn = input<boolean>()

maxWidth

maxWidth = input<number | undefined>()

Maximum column width in pixels.

minWidth

minWidth = input<number | undefined>()

Minimum column width in pixels.

name

name = input<string | undefined>()

Column label. When omitted, the property value is used and decamelized.

pipe

pipe = input<PipeTransform | undefined>()

Custom pipe used to transform cell values.

prop

prop = input<TableColumnProp | undefined>()

Property used to bind row values. When omitted, the name is converted to camel case.

resizeable

resizeable = input<boolean | undefined>()

Whether the user can manually resize the column. Default value: true.

sortable

sortable = input<boolean | undefined>()

Whether row values can be sorted by this column. Default value: true.

summaryTemplate

summaryTemplate = input<TemplateRef<any> | undefined>()

treeLevelIndent

treeLevelIndent = input<number | undefined>()

treeToggleTemplateInput

treeToggleTemplateInput = input<TemplateRef<any> | undefined>()

width

width = input<number | undefined>()

Default column width in pixels. Default value: 150.

Properties

cellClass

readonly cellClass: InputSignal<string | ((data: {
        row: TRow;
        group?: TRow[];
        column: TableColumn<TRow>;
        value: any;
        rowHeight: number;
    }) => string | Record<string, boolean>) | undefined>

CSS classes to apply to the body cell.

cellTemplateQuery

readonly cellTemplateQuery: Signal<TemplateRef<any> | undefined>

column

readonly column: Signal<TableColumn<TRow>>

Computed property that returns the column configuration as a TableColumn object

comparator

readonly comparator: InputSignal<((valueA: any, valueB: any, rowA: TRow, rowB: TRow) => number) | undefined>

Custom client-side sort comparator. It receives cell values and their respective rows; a standard two-argument comparison function is also supported.

ghostCellTemplateQuery

readonly ghostCellTemplateQuery: Signal<TemplateRef<any> | undefined>

headerClass

readonly headerClass: InputSignal<string | ((data: {
        column: TableColumn;
    }) => string | Record<string, boolean>) | undefined>

CSS classes to apply to the header cell.

headerTemplateQuery

readonly headerTemplateQuery: Signal<TemplateRef<any> | undefined>

summaryFunc

readonly summaryFunc: InputSignal<((cells: any[]) => any) | undefined>

treeToggleTemplateQuery

readonly treeToggleTemplateQuery: Signal<TemplateRef<any> | undefined>