Skip to content

GridEditorContext

Context object passed to the cell editor template. Contains the cell value, row data, column configuration, and commit/cancel functions.

PropertyTypeDescription
$implicitTValueThe cell value for this column
valueTValueThe cell value (explicit binding)
rowTRowThe full row data object
fieldstringField name being edited
columnunknownThe column configuration
rowIdstringStable row identifier (from getRowId). Empty string if no getRowId is configured.
onCommit(value: TValue) => voidCallback function to commit the edited value. Use with Angular event binding: (commit)="onCommit($event)"
onCancel() => voidCallback function to cancel editing. Use with Angular event binding: (cancel)="onCancel()"
updateRow(changes: Partial<TRow>) => voidUpdate other fields in this row while the editor is open. Changes trigger cell-change events with source 'cascade'.
onValueChange?(callback: (newValue: TValue) => void) => voidRegister a callback to receive value updates when the cell is modified externally (e.g., via updateRow() from another cell’s commit).
control?AbstractControl<any, any, any>The FormControl for this cell, if the grid is bound to a FormArray with FormGroups.
commitEventEmitter<TValue>⚠️
cancelEventEmitter<void>⚠️
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt