← DataGrid API

Directive · v2.7.1

NgbGridColumnDirective

NgbGridColumnDirective directive exported by the ngbootstrap package API.

Import

import { NgbGridColumnDirective } from '@angular-bootstrap/ngbootstrap';

Selector:ngb-grid-column

Declaration

class NgbGridColumnDirective<T = any> implements ColumnDef<T>

Inputs

field

field: Extract<keyof T, string>

title

title?: string

cellTitle

cellTitle?: string | ((row: T) => string)

sortable

sortable?: boolean

filterable

filterable?: boolean

filterType

filterType?: NgbColumnFilterType

defaultFilterOperator

defaultFilterOperator?: NgbFilterOperator

allowedFilterOperators

allowedFilterOperators?: NgbFilterOperator[]

showFilterMenu

showFilterMenu?: boolean

showFilterRow

showFilterRow?: boolean

showFilterOperator

showFilterOperator?: boolean

editable

editable?: boolean

type

type?: ColumnType

options

options?: Array<{ label: string; value: unknown; }>

width

width?: number

stackedGroup

stackedGroup?: 'start' | 'center' | 'end'

required

required?: boolean

clipboardFormat

clipboardFormat?: ColumnDef<T>['clipboardFormat']

clipboardParse

clipboardParse?: ColumnDef<T>['clipboardParse']

hidden

hidden?: boolean

sticky

sticky?: boolean | 'start' | 'end'

locked

locked?: boolean

reorderable

reorderable?: boolean

resizable

resizable?: boolean

minResizableWidth

minResizableWidth?: number

maxResizableWidth

maxResizableWidth?: number

Methods

toColumnDef

toColumnDef(): ColumnDef<T>

Referenced types

Source: src/datagrid/src/directives/grid-column.directive.ts in the installed @angular-bootstrap/ngbootstrap package. Angular compiler metadata and private members are omitted.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.