Skip to content

Columns ​

Columns decide what a table looks like in the manager — which values the grid shows, in what order, and how they are rendered.

A column usually points at a field; the field owns the data, the column owns the presentation.

What a column row holds ​

SettingWhat it does
FieldWhich field this column shows
CaptionHeader override. Empty means the field's label
WidthColumn width in the grid
DefaultShown when the value is empty
SortableClicking the header sorts by this column
OrderPosition among the columns
PublishedAn unpublished column is not rendered

The grid's search box is not set up here: it searches the fields marked Searchable on the field itself, whether or not they have a column.

Three kinds of column ​

A column is not limited to one field. The kind is chosen on the column itself:

field — one value ​

The ordinary case: one field, one cell.

group — several values in one cell ​

Several fields shown together in a single column. A city and a country, a width and a height — values that are read as one thing and waste a column each.

By default the values appear bare. Set Field labels to Show and each is captioned with its field's label, which is what you want when the values are not self-explanatory:

Moscow, Russia            ← without labels
City: Moscow  Country: Russia   ← with labels

Hide is the default on purpose: a column that says nothing keeps the plain values it had before the setting existed.

condition — the first value that exists ​

Several fields tried in order; the first non-empty one wins, and the column's default is used if none do.

This is the fallback ladder you would otherwise write in a renderer: a display name, then a company name, then a login. One column, no empty cells.

Sorting has a limit ​

A column over a constructor field cannot be sorted. The value lives inside a JSON column, and ordering by it is not something the query can do.

Filtering and search over such fields do work — only ORDER BY does not.

Leave sortable off for constructor fields

Switch it on and nothing breaks and nothing errors: the name is not a real column, so the request falls back to sorting by id. The header stays clickable and the order never changes, which takes longer to notice than a failure would.

Columns over real table columns sort normally.

Width is in pixels ​

0 to 600. Any value other than 0 is a fixed pixel width; 0 means "fit automatically", and the grid then shares out what is left after the fixed columns. Set a width on the two or three columns whose size matters and leave the rest at zero.

© PageBlocks 2019-present