OGE logoOGE

Data Grid API

Complete API reference for @oge-ui/grid — inputs, two-way models, imperative methods, the full event surface and the supporting types, compiled from the source TSDoc. Feature guides live on the demo pages.

Properties Methods Events Types

OgeGrid

oge-grid

Properties 56

Data & columns

Name Type DefaultDescription
datareadonly T[] | DataSource<T>[]Rows to render: a static array or any DataSource implementation (remote, OData…).
columnsreadonly (string | OgeColumnDef&lt;T&gt;)[] | undefined—Programmatic columns: field names or OgeColumnDef objects carrying every <oge-column> option (templates as TemplateRefs). The way to share columns through a wrapper component — Angular content queries never see columns projected through another component. Used only when no declarative children exist; when both are absent, columns derive from the first row.
keyFieldkeyof T | ((row: T) =&gt; RowKey) | undefined—Field (or selector) producing a stable row key; falls back to the row index.

Sorting, filtering & search

Name Type DefaultDescription
sortableboolean | 'single' | 'multi''multi'false disables sorting; 'single' restricts to one column.
sortingOgeSortingOptions | undefined—Sorting options; overrides the sortable shorthand.
filterRowboolean | OgeFilterRowOptionsfalsePer-column filter editors below the header.
headerFilterboolean | OgeHeaderFilterOptionsfalseExcel-style distinct-value filter button in headers.
searchPanelboolean | OgeSearchPanelOptionsfalseGlobal search box above the grid.
filterPanelbooleanfalseFilter panel bar with the filter-builder entry point.
filterValuemodel&lt;FilterExpr | null&gt;nullTwo-way binding of the builder/programmatic filter expression.
filterDebouncenumber | undefined—Debounce for text filter inputs, in ms. Set to 0 in tests.
announcementsboolean | undefinedconfig.announcements (true)Speaks sort, filter/search result count (debounced, once the new result arrived), page, group expansion, select-all and blocked-save validation changes through the shared OgeLiveAnnouncer regions — texts from the *Announcement messages. false opts out.

Paging & scrolling

Name Type DefaultDescription
pagingfalse | OgePagingOptionsfalseClient/server paging with the built-in pager.
virtualScrollbooleanfalseRenders only the rows inside the scroll viewport (plus overscan). Needs a bounded height.
scrollingOgeScrollingOptions | undefined—Scrolling options (standard/virtual/infinite, remote windowing, column virtualization); overrides the shorthand.
rowHeightnumber | undefined—Fixed row height in px used by the virtualizer. Defaults from global config.
autoRowHeightbooleanfalseMeasures real row heights with scroll anchoring. Virtual mode only.
detailRowHeightnumber | undefined—Height assumed for expanded master-detail rows in virtual mode.
overscannumber | undefined—Extra rows rendered above/below the virtual window.

Grouping

Name Type DefaultDescription
groupPanelbooleanfalseDrop area for drag-and-drop row grouping. Keyboard: the header context menu (Shift+F10) offers groupByColumn / ungroupColumn; on a chip’s remove button Ctrl+←/→ reorders the grouping and Delete removes it (messages.groupMoved / groupRemoved).
groupByreadonly string[] | undefined—Initial/programmatic grouping by field names.
groupingOgeGroupingOptions | undefined—autoExpandAll: false starts collapsed and enables deferred child loading; contextMenuEnabled: true offers group/ungroup in the header menu without the group panel.

Selection & focus

Name Type DefaultDescription
selectionModeOgeSelectionMode'none'Row selection: none | single | multiple (ctrl/shift) | checkbox column — or 'cell': rectangular cell ranges (click, Shift+click, drag, Shift+Arrow, Ctrl+click for more ranges, Ctrl+A for all) with TSV copy / paste, the fill handle and range announcements; editing then starts on double-click, F2 or Enter.
selectedKeysmodel&lt;RowKey[]&gt;[]Two-way binding of the selected row keys.
selectAllMode'allPages' | 'page''allPages'Header select-all scope.
selectionDeferredbooleanfalseSelection tracked as a serializable selectionFilter expression — no key set. Requires a string keyField.
selectionFiltermodel&lt;FilterExpr | null&gt;nullTwo-way selection expression (deferred mode).
focusedRowEnabledbooleanfalseHighlights and tracks a single focused row.
focusedRowKeymodel&lt;RowKey | null&gt;nullTwo-way binding of the focused row's key.

Editing & rows

Name Type DefaultDescription
editingfalse | OgeEditingOptionsfalseEnables editing: { mode: 'cell' | 'row' | 'batch' | 'popup' | 'form', allow… }. An invalid cell editor sets aria-invalid on its control and points aria-errormessage / aria-describedby at a rendered, visually hidden error text (also the cell’s tooltip); the form/popup fields wire the same through <oge-form>.
commandButtonsreadonly OgeCommandButton&lt;T&gt;[] | undefined—Customizes the trailing command column: built-in 'edit'/'delete' plus custom buttons with per-row visible.
rowDraggingbooleanfalseDrag-handle column for reordering rows. Arrays mutate in place; DataSources handle rowReordered. Keyboard: Ctrl+↑/↓ on a focused cell moves the row onto its neighbour through the same drop path (same event), announced via messages.rowMoved.

Columns UX

Name Type DefaultDescription
columnChooserbooleanfalseColumn visibility chooser button. Keyboard: Space toggles an item; with columnReorder, Ctrl+↑/↓ moves it. Hiding is also in the header context menu.
columnResizebooleantrueDrag-resize handles on header edges. Keyboard: Alt+←/→ on a focused header resizes by 10px (Shift for 1px); the handle is a focusable role="separator" (aria-valuenow/min/max = width in px, named by messages.resizeColumn) taking ←/→, Home/End (min / max) and Enter/Esc (back to the header). RTL-aware; clamped to minWidth / maxWidth.
columnReorderbooleantrueDrag-and-drop column reordering. Keyboard: Ctrl+Shift+←/→ on a focused header moves the column one step, never across a pinned group or out of its band (an unbanded column steps over a band as a whole), announced via messages.columnMoved.
columnMinWidthnumber | undefined—Track minimum for columns without an explicit width.
columnHidingMode'hide' | 'detail' | undefinedconfig: 'detail'What happens to columns responsive hiding (hidingPriority) takes out on a narrow grid: 'detail' gives every row a toggle (a real button with aria-expanded / aria-controls, labelled by toggleAdaptiveDetail) that reveals the hidden columns' caption / value pairs on a second line of the row, rendered like the cells — format, lookups, boolean words and cell templates; 'hide' drops them with no way back. The hiding pass counts the toggle's 32px track once a column is hidden.

Appearance & misc

Name Type DefaultDescription
stateKeystring | undefined—Persists user state (sort, filters, grouping, layout) via OGE_STATE_STORAGE.
messagesPartial&lt;OgeGridMessages&gt; | undefined—Per-grid overrides of the UI strings.
loadPanelbooleanfalseSpinner overlay while a load is in flight.
wordWrapbooleanfalseCells wrap instead of truncating.
rowAlternationbooleanfalseZebra striping, stable under virtualization.
highlightChangesbooleanfalseBriefly flashes cells patched by push updates.
rtlEnabledboolean | undefined—undefined auto-detects the inherited CSS direction.

Cells, ranges & clipboard

Name Type DefaultDescription
rangeSelectionOgeRangeSelectionOptions | undefined—{ copyHeaders, fillHandle, pasteAddsRows, multipleRanges }: Ctrl+C prepends the captions; the fill handle (on by default while editing) can be turned off; pasted lines past the last row become new rows; Ctrl+click may add ranges (default true).
selectedRangesmodel&lt;readonly OgeGridCellRange[]&gt;[]Two-way binding of the selected ranges ({ anchor, focus } in flat-row / visible-column coordinates). A sort, filter, page or grouping change clears them.
pinnedTopRowsreadonly (T | RowKey)[] | undefined—Rows pinned in a sticky section under the header: data objects, or keys of loaded rows (which then leave the body). Display rows — not editable, selectable or part of arrow-key navigation; virtual scrolling compatible.
pinnedBottomRowsreadonly (T | RowKey)[] | undefined—Rows pinned in the sticky footer, above the total row.
stickyGroupRowsbooleanfalseKeeps the group rows enclosing the first visible row under the header while scrolling (all levels, virtual scrolling included). A visual aid: the real group rows stay focusable; a click on a sticky row scrolls to it.
cellSpan((row: T, column: OgeGridColumnInfo) =&gt; OgeGridCellSpan | null | undefined) | undefined—Row / column spans per cell ({ rowSpan, colSpan }). Spans never cross group rows; the owner cell gets aria-rowspan / aria-colspan and the arrows step over the covered area. Ignored while virtualized; row spans assume uniform row heights.
columnAutoWidthbooleanfalseSizes every column to its header and rendered cells once the first result set rendered.
cellHintEnabledbooleanfalseShows truncated cell text in the overlay tooltip on hover and immediately on keyboard focus (aria-describedby while shown).

Styling & drag groups

Name Type DefaultDescription
rowClass((row: T, key: RowKey) =&gt; OgeClassValue) | undefined—Classes for a data row — a string, an array or a { class: condition } record.
cellClass((row: T, column: OgeGridColumnInfo) =&gt; OgeClassValue) | undefined—Classes for a data cell, per row and column ({ field, caption, dataType, index }).
rowDragGroupstring | undefined—Grids (and other components) sharing a group name accept each other’s dragged rows; the target fires rowDrop with the source row — move the data in the handler. The source needs rowDragging.
allowDropInsideRowbooleanfalseA drop on the middle half of a row reports position: 'inside' (and moves nothing by itself) instead of before / after.

Methods 39

Data & view

Name Type Description
refresh(): voidvoidRe-runs the current load against the DataSource.
getVisibleRows(): readonly T[]readonly T[]Data rows of the currently rendered page, in display order.
getRowByKey(key: RowKey): T | undefinedT | undefinedThe loaded row carrying key, if currently rendered.
totalCount(): numberSignal&lt;number&gt;Data row count of the current filtered set, across all pages.

Navigation & expansion

Name Type Description
scrollToRow(target: number | RowKey): voidvoidScrolls a row into the viewport by flat index or key.
navigateToRow(key: RowKey): voidvoidScrolls to the row and focuses it when focusedRowEnabled.
expandRow(key) / collapseRow(key)voidExpands/collapses a group row (group node key) or master-detail row.
isRowExpanded(key): booleanbooleanExpansion state of a group or master-detail row.
expandAllGroups() / collapseAllGroups()voidExpands/collapses every group row (all levels).

Selection

Name Type Description
selectAll(): voidvoidSelects the current filtered set; honors selectAllMode and deferred mode.
deselectAll() / clearSelection()voidClears the selection (deferred mode: resets selectionFilter).
isRowSelected(key): booleanbooleanWhether the row is currently selected.
getSelectedRowsData(): T[]T[]Data of the selected rows among the loaded rows.
copyToClipboard(): Promise&lt;void&gt;Promise&lt;void&gt;Copies the selected rows (or the focused cell) as tab-separated values.

Editing

Name Type Description
addRow(): voidvoidAdds a new (unsaved) row and opens its editors; initNewRow can prefill. Requires allowAdding.
editRow(key: RowKey): voidvoidOpens the row editor (row/form/popup modes). Requires allowUpdating.
deleteRow(key: RowKey): voidvoidDeletes the row: staged in batch mode (toggle = undelete), saved immediately otherwise. Requires allowDeleting.
saveChanges(): voidvoidCommits the open editor and (batch) saves the staged change set. savingChanges can cancel.
discardChanges(): voidvoidDiscards pending changes and closes any open editor; emits editCanceled.
hasChanges(): booleanbooleanWhether unsaved edits exist.

Paging

Name Type Description
pageIndex(): number / setPageIndex(index)number / voidZero-based page getter / clamped setter.
pageSize(): number / setPageSize(size)number / voidPage size getter / setter; 0 turns paging off.
pageCount(): numberSignal&lt;number&gt;Number of pages; 1 when paging is off.

Columns & summaries

Name Type Description
showColumnChooser(anchor?) / hideColumnChooser()voidOpens the column chooser below anchor (e.g. a button in your own header bar, with columnChooser off so no toolbar row is drawn), else below its toolbar button or the grid's start edge / closes it.
getTotalSummaryValue(field, type?)unknownRaw value of a totalSummary by field (and type, when a column has several); undefined when none is configured or data has not loaded.

Loading, state & export

Name Type Description
beginCustomLoading(message?) / endCustomLoading()voidShows/hides the load panel with an optional message — independent of data activity.
state(): GridStateSnapshot / applyState(snapshot)GridStateSnapshot / voidCaptures / applies the persistable UI state. applyState validates the snapshot first (sanitize*StateSnapshot): unknown keys are dropped, prototype keys rejected, wrong types skipped — invalid input is ignored, never thrown.
clearFilters() / clearSorting()voidClears every filter (row, header, builder, search) / the sort order.
getExportData(options?): Promise&lt;OgeExportData&lt;T&gt;&gt;PromiseRows, column metadata (width, alignment, pin side, band) and the structured lines — group rows, group footers, the total row (items) — of the current view. scope: 'all' | 'page' | 'selection' (or selectedRowsOnly), visibleColumnsOnly: false adds hidden columns, groups / summaries: false export flat.
getCsv(options?): Promise&lt;string&gt;Promise&lt;string&gt;CSV of the current view. Cells a spreadsheet would evaluate as a formula (first non-whitespace character =, +, -, @ or a full-width = + - @, or a leading tab/CR) are prefixed with an apostrophe so the file cannot execute on open — CSV formula injection. Numbers are exempt, so a -5 column stays numeric. Pass formulaGuard: false when the output is machine-read rather than opened in a spreadsheet.
exportCsv(filename = 'grid.csv', options?): Promise&lt;void&gt;Promise&lt;void&gt;Downloads the current view as CSV; fires the cancelable exporting event first. options are getCsv()’s (scope, customizeCell, separator…); formula-leading cells are always neutralized.

Ranges, clipboard & undo

Name Type Description
selectRange(range, add?)(range: OgeGridCellRange, add?: boolean) =&gt; voidSelects a rectangular cell range; add keeps the existing ones.
clearRangeSelection()() =&gt; voidClears every cell range.
getSelectedRangeData()() =&gt; unknown[][]The selected cells’ values as a rows × columns matrix (the lattice Ctrl+C copies).
pasteText(text)(text: string) =&gt; Promise&lt;number&gt;Pastes a TSV block into the editable cells from the focused cell (or fills the selected range with a single value): parsed with the column data type and lookup, validated, written as one undoable batch through the regular edit events. Resolves with the cells written.
fillDown() / fillRight()() =&gt; Promise&lt;number&gt;Ctrl+D / Ctrl+R: copies the range’s first row (column) into the rest — a single row copies the row above it.
undo() / redo()() =&gt; Promise&lt;void&gt;Ctrl+Z / Ctrl+Y: reverts or re-applies the last committed edit, paste or fill (staged in batch mode, saved otherwise).
canUndo() / canRedo()() =&gt; booleanWhether the history has a step to revert / re-apply.
autoFitColumn(field) / autoFitColumns()(field: string) =&gt; voidSizes a column (or every column) to its header and rendered cells — what a double-click on the resize handle and the header menu’s “Size to fit” run.

Events 33

Interaction

Name Type Description
rowClick / rowDblClickOgeRowClickEvent&lt;T&gt;{ row, key, event }.
cellClick / cellDblClickOgeCellClickEvent&lt;T&gt;{ row, key, field, value, event }.
rowContextMenuOgeContextMenuEvent&lt;T&gt;Row right-click — and the Menu key / Shift+F10 in a focused cell; push into items to open the built-in menu. source is 'pointer' or 'keyboard' (then clientX/Y is the cell's start/bottom corner); event is the originating event.
headerContextMenuOgeHeaderContextMenuEventPrebuilt, mutable header menu items (sort/group/pin/hide); also opened by the Menu key / Shift+F10 on a focused header. Carries source and event like rowContextMenu.
rowReorderedOgeRowReorderedEvent&lt;T&gt;A row was dropped in a new position (rowDragging).

Selection & focus

Name Type Description
selectionChangedOgeSelectionChangedEvent{ selectedKeys, addedKeys, removedKeys } after every selection change.
focusedRowChangedOgeFocusedRowChangedEvent&lt;T&gt;{ key, row } after the focused row changed.
focusedCellChangedOgeFocusedCellChangedEvent&lt;T&gt;{ rowIndex, columnIndex, key, row, field } after keyboard/pointer focus moved to another cell; key/row are undefined on group rows.
sortChangedOgeSortChangedEvent{ sort, previousSort } as soon as the sort changed (header, menu, API) — no debounce, unlike stateChange. The initial sort is not a change.
pageChangedOgePageChangedEvent{ pageIndex, pageSize, previousPageIndex, previousPageSize } after the page index or size changed.
rowExpandingOgeGridRowTogglingEvent&lt;T&gt;Before a group or master-detail row expands (pointer, keyboard or expandRow()); { key, kind, row, cancel } — set cancel to veto. Not fired per row by expandAllGroups().
rowExpandedOgeGridRowToggleEvent&lt;T&gt;{ key, kind: 'group' | 'detail', row } after the row expanded.
rowCollapsingOgeGridRowTogglingEvent&lt;T&gt;Before a group or master-detail row collapses; cancelable.
rowCollapsedOgeGridRowToggleEvent&lt;T&gt;After a group or master-detail row collapsed.
selectedKeysChange / focusedRowKeyChange / filterValueChange / selectionFilterChangemodel outputsImplicit outputs of the two-way models.

Editing lifecycle

Name Type Description
editingStartOgeEditingStartEvent&lt;T&gt;Cancelable — before a cell or row editor opens.
initNewRowOgeInitNewRowEventWrite into values to prefill rows created by addRow().
rowInserting / rowInsertedOgeRowInserting/-edEventAround each DataSource insert; rowInserting cancelable.
rowUpdating / rowUpdatedOgeRowUpdating/-edEventAround each DataSource update; rowUpdating cancelable (carries row + values).
rowRemoving / rowRemovedOgeRowRemoving/-edEventAround each DataSource remove; rowRemoving cancelable.
savingChanges / savedChangesOgeSaving/-edChangesEvent&lt;T&gt;Whole batch before (cancelable) / after the save.
editCanceledvoidAn edit session ended without saving.

Lifecycle & errors

Name Type Description
contentReadyvoidA new result set finished rendering (post-render notification).
stateChangeGridStateSnapshotDebounced — the persistable UI state changed.
exportingOgeExportingEventCancelable, mutable fileName — before a CSV export.
dataErrorOccurredOgeDataErrorEvent{ error } — a DataSource load or save failed.

Ranges, preparation & drag

Name Type Description
rangeSelectionChangedOgeRangeSelectionChangedEventThe selected ranges changed: { ranges, rowCount, columnCount, cellCount }.
rowPreparedOgeRowPreparedEvent&lt;T&gt;A data row element rendered a row for the first time (scrolled in, re-keyed) — { row, key, rowIndex, element }, the imperative escape hatch the declarative hooks cannot cover.
cellPreparedOgeCellPreparedEvent&lt;T&gt;Every data cell of a prepared row: { row, key, field, value, rowIndex, columnIndex, element }.
rowDragStartOgeRowDragStartEvent&lt;T&gt;Cancelable: a row drag is about to start.
rowDragOverOgeRowDragOverEventCancelable, on the grid under the pointer: a dragged row of the group hovers it; set cancel to refuse the spot.
rowDropOgeRowDropEventA row was dropped on this grid — its own (a reorder, which also fires rowReordered) or another component’s (sameComponent: false): { sourceComponentId, targetComponentId, sourceKey, sourceRow, targetKey, targetRow, position, toIndex }.
rowDragEndOgeRowDragEndEvent&lt;T&gt;The source side of a drag ended: { key, row, dropped, targetComponentId }.

OgeColumn

oge-column

Properties 29

Companion directives

Name Type DefaultDescription
OgeColumnGroupoge-column-group — input: caption (required)—Banded header: wraps sibling <oge-column> elements under one shared caption. Re-exported by @oge-ui/tree-list.
OgeGridToolbarItemdirective — [ogeToolbar]—Marks projected content as a toolbar item. The toolbar appears as soon as one item exists, alongside the built-in controls. Named OgeGridToolbarItem so it cannot collide with @oge-ui/layout’s OgeToolbarItem; the selector is unchanged.

Basics

Name Type DefaultDescription
fieldstring | undefined—Data field (dot paths supported via accessors).
captionstring | undefined—Header text; humanized from field when omitted.
dataTypeOgeDataType'string''string' | 'number' | 'date' | 'datetime' | 'boolean' — drives editors, filters and the default alignment. 'datetime' keeps the time of day (date + time cells and editor; filters by calendar day).
alignmentOgeColumnAlignment | undefined—'start' | 'center' | 'end' for cells, header and summaries (logical — 'end' is the right edge in LTR). Unset, numbers align to the end and everything else to the start.
width / minWidthnumber | string / number—Track size; minWidth guards resizing.
maxWidthnumber | undefinedundefinedUpper bound in px for user resizing — pointer drag and the Alt+←/→ / separator keys; also the separator’s aria-valuemax.
visiblemodel&lt;boolean&gt;trueTwo-way visibility (column chooser writes it).
format(value: unknown) =&gt; string | undefined—Display formatter for cells, group rows, export.
pinnedfalse | 'left' | 'right'falsePins the column to an edge.
hidingPrioritynumber | undefined—Adaptive hiding order when width runs out (higher survives longer); the hidden values stay reachable through the row toggle unless columnHidingMode is 'hide'.
lookupOgeColumnLookup | undefined—Display + dropdown editor from a value list; cascading via function dataSource.

Sort, filter & group

Name Type DefaultDescription
sortable / filterablebooleantruePer-column opt-outs.
sortOrder / sortIndex'asc' | 'desc' / number—Initial sort (stateKey/user wins).
groupIndexnumber | undefined—Initial grouping position.
groupInterval'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year' | number | undefined—Bucket when grouping by this column — calendar units for dates ('day' by default for date / datetime; 'week' starts on the locale’s first day of week) or a positive width for numbers (100 → 0–99, 100–199…). Captions read Week of …, Q2 2026, 100 – 200. Sent as LoadOptions.group[].interval.
filterOperatorFilterOperator | undefined—Initial operator of the filter-row cell.
calculateCellValue(row: T) =&gt; unknown—Calculated column value.
calculateSortValue(row: T) =&gt; unknown—Custom sort key.
calculateFilterExpression(value, operator) =&gt; FilterExpr | null—Custom filter expression builder.

Summaries & editing

Name Type DefaultDescription
groupSummary / totalSummarySummaryType | readonly SummaryType[]—sum/avg/min/max/count/custom aggregates per column.
groupSummaryPosition'row' | 'footer''row'Group aggregates inline or in a footer row.
calculateCustomSummary(rows: readonly T[]) =&gt; unknown—Reducer for type: 'custom'.
editablebooleantruePer-column editing opt-out.
required / validatorsboolean / readonly ValidatorFn[]—Editor validation.

Formatting, merging & async validation

Name Type DefaultDescription
conditionalFormatsreadonly OgeConditionalFormat&lt;T&gt;[] | undefined—Declarative formats: rules { when: (value, row) => boolean | { operator, value }, class?, style?: { tone, background, bold } }, { type: 'dataBar' }, { type: 'colorScale', tones? } and { type: 'iconSet', icons?, thresholds? }. Token classes and CSS custom properties only — themes and forced colours keep working.
mergeCellsbooleanfalseMerges vertically adjacent equal values into one cell (aria-rowspan); not applied while virtualized.
asyncValidatorsreadonly AsyncValidatorFn[] | undefined—Async Angular validators (a server uniqueness check): the editor is aria-busy while one runs, a commit waits for it, failures use the usual error wiring; pastes and fills run them too.

Types 8

Name Type Description
&lt;oge-column-group caption="…"&gt;componentBanded (multi-row) headers — wraps child <oge-column>s.
*ogeCellTemplateOgeCellTemplateContext&lt;T&gt;{ $implicit: value, row, rowIndex, column }.
*ogeHeaderTemplateOgeHeaderTemplateContext&lt;T&gt;{ $implicit: column }.
*ogeEditTemplateOgeEditTemplateContext&lt;T&gt;{ $implicit: FormControl, row, column }.
*ogeDetailTemplateOgeDetailTemplateContext&lt;T&gt;Master-detail content; { $implicit: row }.
*ogeRowTemplateOgeRowTemplateContext&lt;T&gt;Full-row replacement; { $implicit: row, index, key }.
*ogeNoDataTemplateTemplateRefCustom empty state.
[ogeToolbar]marker directive — 'before' | 'center' | 'after'Projects custom controls into the grid toolbar. The static value picks the group: ogeToolbar="before" (start edge — filters, primary actions), "center", or bare / "after" (next to the built-in tools).

Grid types & configuration

Types 49

Standalone building blocks

Name Type Description
OgeCellEditoroge-cell-editor — inputs: control (required), dataType, lookupItems, label, surface, invalid, errorTitle; outputs: enterKey, escapeKey, tabKeyThe editor the grid renders in a cell: picks the dataType-matched oge-*-box from @oge-ui/inputs and binds it to a reactive FormControl. Usable on its own to get grid-identical editing in a form.
OgePageroge-pager — inputs: pageIndex, pageCount, totalCount (required), pageSize, pageSizes, showInfo, displayMode, messages; outputs: pageChange, pageSizeChangeThe grid's pager as a standalone component — reuse it under a list or a card grid so paging looks identical everywhere.
ogeColumnFromDef(def)(def: OgeColumnDef&lt;T&gt;) =&gt; OgeColumn&lt;T&gt;What [columns] runs on: turns a column definition into the signal surface of an <oge-column>. For a custom grid-like component that accepts the same OgeColumnDefs.
OgeColumnDefCacheclass { resolve(defs): OgeColumn&lt;T&gt;[] }Keeps one column — and its visibility — per definition object across change detection; field-name strings are cached by name.
OgeFilterBuilderGroupoge-filter-builder-groupRecursive node of the filter builder (a group of conditions plus nested groups). Exported so a custom filter UI can reuse the same tree editor.
formatCellValue(value, dataType, format?)(value: unknown, dataType: OgeDataType, format?: (value: unknown) =&gt; string) =&gt; stringThe exact formatting the grid applies to a cell. Use it to keep exports, tooltips or custom templates byte-identical with the rendered grid.

Internals — not a supported API

Name Type Description
GridStateStorecomponent-scoped serviceComposes the state slices; loadOptions is the single choke point through which every data-affecting change triggers exactly one load. Injected by the grid, not by applications — use state() / applyState() instead.
GridDataAdaptercomponent-scoped serviceBridges the reactive state to the pull-based DataSource contract with switchMap semantics, so a stale response can never win over a newer one.
SortSlice / FilterSlice / GroupingSlice / PagingSlice / ColumnsSlice / SelectionSlice / ExpansionSlice / OgeEditingSlicestate slicesRead-only signals plus intent methods behind GridStateStore. Exported for the suite's own packages (tree-list, pivot) — treat them as internal: they may change in any release.

Option objects (boolean shorthands stay valid)

Name Type Description
OgePagingOptions{ pageSize: number; pageSizes?: readonly (number | 'all')[]; showInfo?; displayMode?: 'full' | 'compact' | 'adaptive' }Pager configuration.
OgeSortingOptions{ mode?: 'none' | 'single' | 'multi'; allowUnsorting?: boolean }Sorting behavior.
OgeFilterRowOptions{ visible?: boolean; debounce?: number }Filter row.
OgeHeaderFilterOptions{ visible?: boolean; valueLimit?: number }Header filter.
OgeSearchPanelOptions{ visible?: boolean; placeholder?: string; width?: number }Search panel.
OgeScrollingOptions{ mode?: 'standard' | 'virtual' | 'infinite'; remote?: boolean; columnRenderingMode?: 'standard' | 'virtual' }Scrolling engine.
OgeGroupingOptions{ autoExpandAll?: boolean; contextMenuEnabled?: boolean }autoExpandAll: false starts collapsed and defers child loading; contextMenuEnabled puts group/ungroup in the header menu without the group panel.
OgeEditingOptions{ mode: OgeEditMode; allowUpdating?; allowAdding?; allowDeleting?; confirmDelete?; formItems?; formColCount? }Editing configuration; OgeEditMode = cell | row | batch | popup | form.
OgeCommandButton&lt;T&gt;{ name?: 'edit' | 'delete'; text?; onClick?(row, key); visible?(row) }Command column entries.
OgeColumnLookup{ dataSource: readonly unknown[] | ((row) =&gt; readonly unknown[]); valueExpr?; displayExpr? }Lookup source.

Export

Name Type Description
OgeExportOptions&lt;T&gt;{ scope?; selectedRowsOnly?; visibleColumnsOnly?; groups?; summaries?; customizeCell?(args); cellStyle?(args) }Shared by CSV/Excel/PDF. customizeCell rewrites a data cell (return a value) and restyles it (mutate style); cellStyle is the value-level styling seam for every cell — header, group and summary lines included — so conditional formatting exports the same way it renders.
OgeExportData&lt;T&gt; / OgeExportColumn&lt;T&gt; / OgeExportCellArgs&lt;T&gt;interfacesRows + resolved column metadata handed to exporters; items carries the group / footer / total lines when the view is grouped or summarized.
OgeExportItem&lt;T&gt; / OgeExportSummaryCell / OgeExportRowKind{ kind: 'data' | 'group' | 'groupFooter' | 'total'; … }One exported line: a data row at its group depth, a group header (text, value, count, header summaries), a group footer or the total row with typed summary values.
OgeExportCellStyle / OgeExportCellStyleArgs&lt;T&gt;{ bold?, italic?, underline?, color?, background?, fontSize?, alignment?, verticalAlignment?, wrap?, border?, numFmt? }Cell style both file builders apply (colours as #rrggbb; numFmt is Excel-only).
exportGridToExcel(grid, options?)@oge-ui/grid/export-excelLazy Excel export (exceljs peer): merged band headers, frozen header rows + left-pinned columns (freezeHeader, freezeColumns), grid or auto column widths (columnWidths), number/date formats (numberFormat, dateFormat, dateTimeFormat, columnFormats), group rows with collapsible outline levels (outline), group-footer and total rows as values or SUBTOTAL formulas (summaryFormulas), headerStyle / groupStyle / summaryStyle, auto-filter. buildExcelWorkbook(data, options) for custom pipelines.
exportGridToPdf(grid, options?)@oge-ui/grid/export-pdfLazy PDF export (jspdf peer): the header block repeated on every page (repeatHeader), group and summary rows, grid widths fitted to the page (fitToWidth), orientation, pageFormat, title, pageHeader / pageFooter callbacks and pageNumbers. buildPdfDocument(data, options) for custom pipelines. Text outside WinAnsi (Turkish ğ ş ı İ, Central European, Greek, Cyrillic) needs a Unicode TrueType font — per export, or once for every PDF via setOgePdfDefaultFont({ family, normal, bold }) from @oge-ui/behavior; without one the built-in Helvetica cannot draw it (a dev-mode warning says so).
OgeExcelExportOptions&lt;T&gt; / OgePdfExportOptions&lt;T&gt; / OgePdfPageInfointerfacesThe two download helpers’ options (each extends OgeExportOptions) and what a PDF page callback is told (pageNumber, pageCount).

Configuration

Name Type Description
provideOgeGridConfig(config)ProviderApp/component-scoped defaults; deep-merges messages.
OgeGridConfig{ rowHeight: 36; detailRowHeight: 200; filterDebounce: 300; overscan: 6; columnMinWidth: 120; pinnedDefaultWidth: 150; headerFilterValueLimit: 200; allowUnsorting: true; columnHidingMode: 'detail'; announcements: true; messages }Defaults shown inline.
OgeGridMessages60+ string keysEvery user-facing string, incl. aria labels, filter operators, summary patterns — see OGE_DEFAULT_MESSAGES in the source.
messages.reorderColumnHeader / messages.detailColumnHeader / messages.selectAllColumnHeader / messages.reorderRowstringAccessible names of the row-drag, master-detail and selection header cells and of a row’s drag handle. Defaults: Reorder, Detail, Select all, Reorder row. The tree list reads reparentColumnHeader / reparentRow (Reparent, Reparent row) for its reparenting handle.
messages.resizeColumn / messages.columnResized / messages.columnMoved / messages.rowMoved / messages.treeRowMoved / messages.groupMoved / messages.groupRemovedstringThe keyboard alternatives to dragging (WCAG 2.1.1 / 2.5.7): the resize separator’s name (Resize {column}) and the polite live-region announcements after a keyboard resize ({column} width {width} pixels), column move ({column} moved to position {position} of {total}), row move (Row moved to position {position} of {total}), tree-row move (Row moved to level {level}, position {position} of {total}) and group-chip reorder / removal (Grouping by {column} moved to position {position} of {total}, Grouping by {column} removed).
messages.booleanTrueLabel / messages.booleanFalseLabelstringScreen-reader text of a default-rendered boolean cell (Yes / No). The visible booleanTrue / booleanFalse glyph (✓ / ✗, also the CSV text) is rendered aria-hidden; the label is rendered visually hidden beside it. Columns with a custom format, a lookup or a cell template render their own text. Localizing booleanTrue / booleanFalse to words? Set the labels too — they are announced, the glyph text is not.
messages.sortAscendingAnnouncement / messages.sortDescendingAnnouncement / messages.sortClearedAnnouncement / messages.rowCountAnnouncement / messages.rowCountOneAnnouncement / messages.pageAnnouncement / messages.groupExpandedAnnouncement / messages.groupCollapsedAnnouncement / messages.rowExpandedAnnouncement / messages.rowCollapsedAnnouncement / messages.selectionCountAnnouncement / messages.validationErrorAnnouncementstringLive-announcement patterns, {placeholder}-interpolated. Defaults: Sorted by {column}, ascending / descending, Sort cleared, {count} rows / {count} row, Page {n} of {total}, Group {value} expanded / collapsed, {value} expanded / collapsed (tree list), {count} rows selected and {column}: {error} (spoken assertively when a save is blocked by an invalid editor).
OGE_STATE_STORAGE / OgeStateStorageInjectionTokenPluggable sync/async persistence backend for stateKey.

Filter builder

Name Type Description
builderToExpr / exprToBuilder / describeExpr / operatorsForfunctionsConvert between builder trees and FilterExpr; humanize expressions.
OgeBuilderGroup / OgeBuilderCondition / OgeFilterBuilderFieldinterfacesFilter-builder data model.

Ranges, formats, spans & drag

Name Type Description
OgeGridCellRange / OgeGridCellCoordinterfaces{ anchor, focus } of { row, col } — flat row index and visible column index, the keyboard machine’s coordinates.
OgeRangeSelectionOptionsinterface{ copyHeaders?, fillHandle?, pasteAddsRows?, multipleRanges? }.
OgeRangeSelectionChangedEventinterface{ ranges, rowCount, columnCount, cellCount }.
OgeClassValuetypeWhat class hooks return: string | string[] | Record<string, boolean> | null.
OgeGridColumnInfointerface{ field, caption, dataType, index } — what cellClass / cellSpan learn about a column.
OgeConditionalFormattypeA rule or a data bar / colour scale / icon set (see conditionalFormats).
OgeGridCellSpaninterface{ rowSpan?, colSpan? }.
OgeRowPreparedEvent / OgeCellPreparedEventinterfacesPayloads of rowPrepared / cellPrepared.
OgeRowDragStartEvent / OgeRowDragOverEvent / OgeRowDropEvent / OgeRowDragEndEvent / OgeRowDropPositioninterfacesCross-component row drag payloads; position is 'before' | 'after' | 'inside'.
OgeHeaderFilterModetypeheaderFilter.mode: 'list' (default) the value checklist, 'conditions' two operator + value conditions joined by And / Or, 'both' the Excel-style menu (conditions above the list). Date columns list their values as a year → month → day tree.
OgePagerInfoTemplatedirective*ogePagerInfoTemplate="let info" replaces the pager’s info text; info is { pageIndex, pageCount, totalCount, pageSize, firstRow, lastRow, text }. paging.showFirstLastButtons / paging.showPageInput add first/last buttons and a go-to-page input.
messages.rangeSelectedAnnouncement / messages.cellsPastedAnnouncement / messages.cellsFilledAnnouncement / messages.undoAnnouncement / messages.redoAnnouncement / messages.fillHandle / messages.validationPending / messages.autoFitColumnstringRange, paste, fill and undo announcements ({rows} by {columns} cells selected, {count} cells pasted…), the fill handle’s tooltip, the busy editor’s status text and the “Size to fit” header-menu item.
messages.filterByCondition / messages.filterByValues / messages.firstCondition / messages.secondCondition / messages.firstPage / messages.lastPage / messages.goToPage / messages.pageOfCount / messages.groupWeekPattern / messages.groupQuarterPattern / messages.groupRangePatternstringHeader filter menu sections and condition names, pager first/last/go-to-page labels (of {count}) and the interval group captions (Week of {date}, Q{quarter} {year}, {from} – {to}).

Notes

  • Methods are reached through a template reference (viewChild(OgeGrid)) — there is no instance()/option() machinery; state flows through signal inputs and two-way models.
  • jQuery-era members (repaint(), beginUpdate(), onOptionChanged…) are intentionally absent; the ROADMAP's "API parity" section documents every mapping decision.