Readonly autoTrue if the header follows the grouping (no own headerLabel).
Optional editConverts the text of the editor before it is written into the model, e.g. editInputPipeForNumber.
Optional editableThe cells of this column can be edited (double-click or F2), e.g. TrueFn.
Training: Inline editing
Optional formulaThe formula of a formula column, see ColumnDefIf.formula.
Optional getThe editor of this column. Default: TableOptions.getEditRenderer (a text input, InputCellRenderer).
getEditRenderer: () => new SelectCellRenderer(["open", "paid"].map(s => new ValueLabel(s, s)))
Text of the header cell (used when the header is built from the column definitions).
Whether the column is shown. Hidden columns are not rendered, copied or exported.
ColumnDef.create({ property: "category", headerLabel: "Category", isVisible: FalseFn })
Upper limit for percentage widths ("%"). Not applied to pixel widths or to resizing with the mouse.
Lower limit for percentage widths ("%"). Not applied to pixel widths or to resizing with the mouse.
Readonly optionsThe options with defaults.
Property of the row object shown in this column ("customer"). With nested objects a path like "address.city".
Cell renderers per area – rendererMap.header, .body, .footer.
Without a renderer the value is shown as text.
column.rendererMap.body = new NumberCellProgressBarCellRenderer(20, false);
column.rendererMap.footer = new EuroRenderer(); // an own CellRendererIf
Training: Cell renderers
Optional rowRow drag: the body cells of this column get a drag handle (true, or a function that decides per row – e.g. no
handle for locked rows). Dragging the handle moves the row (see TableOptionsIf.rowDragOptions); the keyboard
alternative is Ctrl+Alt+↑/↓. TableFactory.createTableModel({ rows, rowDrag: true }) sets it on the first data
column.
ColumnDef.create({ property: "title", headerLabel: "Task", rowDrag: (task: { locked: boolean }) => !task.locked })
1.1.95
Optional show„Show values as“, see ColumnDefIf.showValuesAs.
Optional sortOwn comparison of two cell values (and their rows), like for Array.prototype.sort.
sortComparator: (a: string, b: string) => a.localeCompare(b, "de") // "Müller" before "Nordlicht"
Training: Sorting
Optional sortShow the sort icon in the header. Default: follows sortable resp. sortState.
Optional sortThe sort icon shown in the header: "asc", "desc" or "" (none). It only sets the icon –
sort the rows once with TableModelIf.doSort to match it.
Optional sortOrder of the sort states on repeated double-clicks. Default: TableOptions.sortOrder (["asc", "desc"]).
Optional sortableThe column can be sorted by a double-click on its header (e.g. TrueFn).
Readonly typeMarker for isRowGroupColumnDef (works across copies of the core).
Optional validateChecks edited values, see ColumnDefIf.validate (since 1.1.96).
Optional valueA calculated column, see ColumnDefIf.valueGetter.
Optional valueWrites an edited calculated value back, see ColumnDefIf.valueSetter.
Width of the column: px120, new Size(10, "%") or new Size(1, "weight"). See SizeUnitType.
Static Readonly PROPERTYThe property of the group column.
Static bodyStatic createCreates a column definition from named parameters. Everything is optional; defaults: width 100 px,
visible, not editable, sortable only if sortable is given.
headerRenderer / bodyRenderer / footerRenderer and headerClasses / bodyClasses / footerClasses
fill ColumnDefIf.rendererMap and ColumnDefIf.classes.
Optional bodyCSS classes of the body cells.
Optional bodyRenderer of the body cells.
Optional editConverts the editor text before it is stored, e.g. editInputPipeForNumber.
Optional editable?: BooleanFunctionCells can be edited, e.g. TrueFn.
Optional footerCSS classes of the footer cells.
Optional footerRenderer of the footer cells.
Optional formula?: stringA formula column, e.g. "[price] * [quantity] * 1.19" – compiled once into the valueGetter (since 1.1.95,
see compileFormula). Takes precedence over valueGetter.
Optional formulaOwn functions of the formula (since 1.1.95).
Optional getThe editor of this column.
Optional headerCSS classes of the header cell, e.g. ["ge-table-text-align-right"].
Optional headerHeader label.
Optional headerRenderer of the header cell.
Optional isColumn is shown (default TrueFn).
Optional maxUpper limit for % widths.
Optional minLower limit for % widths.
Optional property?: stringProperty of the row object, see ColumnDefIf.property.
Optional rowOptional show„Show values as“: "percentOfColumnTotal", "rank" … (since 1.1.95).
Optional sortOwn comparison of two cell values.
Optional sortShow the sort icon (default: follows sortable).
Optional sortInitial sort icon ("asc", "desc"); sort the rows with tableModel.doSort() to match.
Optional sortOrder of the sort states on repeated double-clicks.
Optional sortable?: BooleanFunctionSortable by double-click on the header, e.g. TrueFn.
Optional validate?: CellValidatorChecks edited values: a message for an invalid value (since 1.1.96).
Optional valueA calculated column: (row, context) => value (since 1.1.95).
Optional valueMakes a calculated column editable (since 1.1.95).
Optional width?: SizeIfWidth, default 100 px.
ColumnDef.create({
property: "price", headerLabel: "Price", width: px100,
headerClasses: ["ge-table-text-align-right"], bodyClasses: ["ge-table-text-align-right"],
sortable: TrueFn
});
The group column of a row grouping: arrows, indentation and the group labels (
"Nord (3)"). Created by RowGroupFactory.createTableModel; the column is sortable (by group key) and not editable. Its property is RowGroupColumnDef.PROPERTY – sort and state refer to it like to any column.Example
Since
1.1.94