Skip to main content
A column type decides how a value is checked, parsed from text, formatted for display and compared for sorting. It also declares which filter operators, aggregates and facet the column gets. Fourteen types are built in, and you can register your own with the same API.

Built-in types

The query language reference lists the operators, aggregates and facet of each type, generated from the code.

Kinds

Every type has one of five kinds. The kind decides which operators the type uses and how the grid treats it. bar is the exception among numbers: its aggregates are avg, min, max and count. Text and enum types are searchable by default. Number, date and boolean columns are not. Enum, date, boolean and person columns are groupable by default.

Empty values

null, undefined and '' are empty in every type. Empty values sort last in both directions and never match a comparison, except neq, notContains and notIn, which keep them. Aggregates skip them.

Formatting

The format option of a column tunes the built-in formatters. Formatting follows the grid’s format context: locale, timeZone and numberingSystem, which default to en-US, UTC and latn. Pass format: createFormatContext({ locale: 'de-DE' }) to the grid to change them. The time zone also decides what today is for relative dates.

The ColumnType contract

A column type is a plain object. The built-ins are ordinary values of this shape.

Registering a type

Types live in a registry. createDefaultRegistry() holds the fourteen built-ins. Register a type and pass the registry to createSchema.
registry.ts
Registering a name twice throws duplicate_type. A column whose type is not in the registry throws unknown_type.