Column Types in Apex Grid

Each column in the Apex grid declares a type that determines how it renders, how it sorts, and which editor it uses in inline-editing mode. Seven built-in types cover the common cases; for one-off display tweaks, use a cell template on the column.

Built-in types

TypeDisplayEditorNotes
string (default)Plain textSingle-line input
numberRight-aligned, locale-formattedNumeric input
booleanPolished checkbox / dash glyphNative checkbox
selectLabel for the matched optionDropdown of options[]Provide options on the column
ratingStar bar (filled / empty)Star bar with keyboard supportConfigurable max value
dateLocale-formatted dateNative date pickerAccepts Date or ISO string
imageInline image previewURL inputFalls back to alt text on load failure

Declaring a column type

{
  key: 'createdAt',
  type: 'date',
}

For types that need configuration:

{
  key: 'priority',
  type: 'select',
  options: [
    { value: 'low',    label: 'Low'    },
    { value: 'medium', label: 'Medium' },
    { value: 'high',   label: 'High'   },
  ],
}
{
  key: 'score',
  type: 'rating',
  max: 5,
}

Customizing cell display

The seven built-in types are the only registered types. For column-specific display formatting (currency, status pills, icons, etc.), use the per-column cellTemplate — it receives the cell value and returns a Lit template rendered in the cell.