Skip to main content

IFrameEditor

Defined in: js-api/src/grid.ts:916

What a Grid needs from an editing engine over its frame (see Grid.attachEditor): the grid reports edits through beginEdit / commitEdit, paints from isChanged / errorOf, and gates editing on writableColumns / isSaving. DG.DomainFrameEditor is the platform's implementation; the editor itself subscribes to no grid events.

Properties

PropertyModifierTypeDescriptionDefined in
isSavingreadonlyboolean-js-api/src/grid.ts:934
onChangedreadonlyObservable<unknown>-js-api/src/grid.ts:935
onRefreshedreadonlyObservable<DataFrame>Fires with the NEW frame when the editor rebuilt it — the grid rebinds.js-api/src/grid.ts:937
onSavingChangedreadonlyObservable<boolean>-js-api/src/grid.ts:938
writableColumnsreadonlystring[] | nullThe columns the user may edit; null (or empty) when NOTHING in the frame can be edited — the whole grid is read-only.js-api/src/grid.ts:933

Methods

beginEdit()

beginEdit(row): void

Defined in: js-api/src/grid.ts:917

Parameters

ParameterType
rownumber

Returns

void


canEdit()

canEdit(row, column): boolean

Defined in: js-api/src/grid.ts:923

Whether this one cell may be edited — the row dimension writableColumns cannot express (a per-row right, a draft the caller may not insert).

Parameters

ParameterType
rownumber
columnstring

Returns

boolean


commitEdit()

commitEdit(row, column): void

Defined in: js-api/src/grid.ts:918

Parameters

ParameterType
rownumber
columnstring

Returns

void


errorOf()

errorOf(row, column): { kind: "error" | "conflict"; message: string; } | null

Defined in: js-api/src/grid.ts:920

Parameters

ParameterType
rownumber
columnstring

Returns

{ kind: "error" | "conflict"; message: string; } | null


isChanged()

isChanged(row, column): boolean

Defined in: js-api/src/grid.ts:919

Parameters

ParameterType
rownumber
columnstring

Returns

boolean


refusalOf()?

optional refusalOf(row, column): string | null

Defined in: js-api/src/grid.ts:926

Why the cell may not be edited, in the user's own vocabulary (the row's name, the column's caption) — the grid's refusal message; optional, a generic one otherwise.

Parameters

ParameterType
rownumber
columnstring

Returns

string | null


refuse()?

optional refuse(row, column, message): void

Defined in: js-api/src/grid.ts:930

Told that the host refused an edit of that cell, once per attempt — how a refusal the GRID detects reaches the editor's error channel (DomainFrameEditor.onRefused), and a host's status line; optional.

Parameters

ParameterType
rownumber
columnstring
messagestring

Returns

void