Data Grid Context Menu
Module Extensions
Section titled “Module Extensions”HTMLRevoGridElement (Extended from global)
Section titled “HTMLRevoGridElement (Extended from global)”interface HTMLRevoGridElement { dataGridContextMenu?: false | DataGridContextMenuConfig; 'data-grid-context-menu'?: false | DataGridContextMenuConfig}HTMLRevoGridElementEventMap (Extended from global)
Section titled “HTMLRevoGridElementEventMap (Extended from global)”interface HTMLRevoGridElementEventMap { [DATA_GRID_CONTEXT_MENU_COMMAND_EVENT]: DataGridContextMenuCommandDetail; [DATA_GRID_CONTEXT_MENU_ERROR_EVENT]: DataGridContextMenuErrorDetail}AdditionalData (Extended from @revolist/revogrid)
Section titled “AdditionalData (Extended from @revolist/revogrid)”interface AdditionalData { /** Legacy configuration path. Prefer `grid.dataGridContextMenu`. */ dataGridContextMenu?: false | DataGridContextMenuConfig}Plugin API
Section titled “Plugin API”DATA_GRID_CONTEXT_MENU_SURFACE_ITEM_IDS
Section titled “DATA_GRID_CONTEXT_MENU_SURFACE_ITEM_IDS”DATA_GRID_CONTEXT_MENU_SURFACE_ITEM_IDS: { readonly cell: readonly DataGridContextMenuItemId[]; readonly rowHeader: readonly DataGridContextMenuItemId[]; readonly rowGroup: readonly DataGridContextMenuItemId[]; readonly columnHeader: readonly DataGridContextMenuItemId[]; readonly columnGroupHeader: readonly DataGridContextMenuItemId[]; };DataGridContextMenuPlugin
Section titled “DataGridContextMenuPlugin”Task-oriented context-menu defaults for cells, rows, row groups, columns,
and column groups. The preset is opt-in: add this plugin to grid.plugins.
It composes before application and other plugin menu contributions.
Dependencies
Section titled “Dependencies”- Auto-installed
ContextMenuPlugin: Uses ContextMenuPlugin for popup composition and interaction. - Auto-installed
ColumnDialogPlugin: Uses ColumnDialogPlugin and its ColumnHidePlugin dependency for column management. - Auto-installed
DataGridFormattingPlugin: Uses DataGridFormattingPlugin for spreadsheet-style formatting. - Auto-installed
DataGridCellInspectorPlugin: Uses DataGridCellInspectorPlugin for read-only cell and column inspection. - Config integration
grid.dataGridContextMenu,additionalData.dataGridContextMenu: Reads the direct dataGridContextMenu property and legacy additionalData fallback.
class DataGridContextMenuPlugin { /** Resolve the semantic context and current configured items without opening a popup. */ getItems(menu: ContextMenuOpenContext);
/** Resolve the task-oriented semantic surface for a low-level menu context. */ getContext(menu: ContextMenuOpenContext): DataGridContextMenuContext<T>;
destroy(): void;}DataGridContextMenuSurface
Section titled “DataGridContextMenuSurface”export type DataGridContextMenuSurface = | 'cell' | 'rowHeader' | 'rowGroup' | 'columnHeader' | 'columnGroupHeader';DataGridContextMenuItemId
Section titled “DataGridContextMenuItemId”export type DataGridContextMenuItemId = | 'menu.copy' | 'menu.rows' | 'menu.filter' | 'menu.export' | 'menu.sort' | 'menu.grouping' | 'menu.pin' | 'menu.move' | 'menu.size' | 'menu.schema' | 'menu.format' | 'cell.edit' | 'cell.inspect' | 'cell.clear' | 'clipboard.cut' | 'clipboard.copy' | 'clipboard.copyCell' | 'clipboard.copyWithHeaders' | 'clipboard.paste' | 'row.copy' | 'row.copyWithHeaders' | 'row.clear' | 'row.insertAbove' | 'row.insertBelow' | 'row.duplicate' | 'row.delete' | 'row.pinTop' | 'row.pinBottom' | 'row.unpin' | 'rowGroup.toggle' | 'rowGroup.expandAll' | 'rowGroup.collapseAll' | 'rowGroup.selectDescendants' | 'rowGroup.copy' | 'rowGroup.copyWithHeaders' | 'rowGroup.exportCsv' | 'rowGroup.removeField' | 'rowGroup.clearGrouping' | 'filter.keepOnly' | 'filter.exclude' | 'filter.open' | 'filter.clear' | 'column.copy' | 'column.copyWithHeader' | 'column.inspect' | 'column.sortAscending' | 'column.sortDescending' | 'column.clearSort' | 'column.filterOpen' | 'column.filterClear' | 'column.groupBy' | 'column.ungroup' | 'column.pinLeft' | 'column.pinRight' | 'column.unpin' | 'column.moveLeft' | 'column.moveRight' | 'column.moveStart' | 'column.moveEnd' | 'column.autoSize' | 'column.autoSizeAll' | 'column.resetWidth' | 'column.hide' | 'column.manage' | 'column.insertLeft' | 'column.insertRight' | 'column.duplicate' | 'column.delete' | 'column.exportCsv' | 'columnGroup.toggle' | 'columnGroup.autoSize' | 'columnGroup.hide' | 'format.automatic' | 'format.number' | 'format.currency' | 'format.accounting' | 'format.percent' | 'format.scientific' | 'format.date' | 'format.datetime' | 'format.time' | 'format.more' | 'format.clear' | 'export.selectionCsv' | 'export.rowsCsv' | 'export.allCsv' | 'export.allExcel';DataGridContextMenuCommandId
Section titled “DataGridContextMenuCommandId”Stable ids for actionable built-in leaves. Submenu containers never execute.
/** Stable ids for actionable built-in leaves. Submenu containers never execute. */export type DataGridContextMenuCommandId = Exclude< DataGridContextMenuItemId, `menu.${string}`>;DataGridContextMenuRow
Section titled “DataGridContextMenuRow”interface DataGridContextMenuRow { readonly type: DimensionRows; /** Visible viewport index. Undefined when a selected source row is filtered or collapsed. */ readonly virtualIndex?: number; readonly physicalIndex: number; /** Index in the authored source before grouping rows were projected. */ readonly sourceIndex: number; readonly model: T}DataGridContextMenuContext
Section titled “DataGridContextMenuContext”interface DataGridContextMenuContext { readonly surface: DataGridContextMenuSurface; readonly menu: ContextMenuOpenContext; readonly rows: readonly DataGridContextMenuRow<T>[]; readonly range?: RangeArea; readonly rowType?: DimensionRows; readonly columnType?: DimensionCols; /** Invocation-time index in the resolved column store before visibility projection. */ readonly columnPhysicalIndex?: number; /** Invocation-time rendered width from the active column dimension. */ readonly columnSize?: number; readonly column?: ColumnRegular; readonly columns: readonly ColumnRegular[]; readonly columnGroup?: ContextMenuColumnGroup; /** Grid-level readonly state. Per-cell readonly is resolved from column schema. */ readonly readonly: boolean}DataGridContextMenuStateResolver
Section titled “DataGridContextMenuStateResolver”export type DataGridContextMenuStateResolver<T extends DataType = DataType> = | boolean | ((context: DataGridContextMenuContext<T>) => boolean);DataGridContextMenuItemsFactory
Section titled “DataGridContextMenuItemsFactory”export type DataGridContextMenuItemsFactory<T extends DataType = DataType> = ( context: DataGridContextMenuContext<T>,) => readonly ContextMenuItem[];DataGridContextMenuItemsResolver
Section titled “DataGridContextMenuItemsResolver”export type DataGridContextMenuItemsResolver<T extends DataType = DataType> = ( context: DataGridContextMenuContext<T>, defaultItems: readonly ContextMenuItem[],) => readonly ContextMenuItem[];DataGridContextMenuCommandHandler
Section titled “DataGridContextMenuCommandHandler”export type DataGridContextMenuCommandHandler<T extends DataType = DataType> = ( context: DataGridContextMenuContext<T>,) => void | Promise<void>;DataGridCreateRowAction
Section titled “DataGridCreateRowAction”export type DataGridCreateRowAction = | 'insertAbove' | 'insertBelow' | 'duplicate';DataGridCreateRowContext
Section titled “DataGridCreateRowContext”interface DataGridCreateRowContext { readonly action: DataGridCreateRowAction; readonly sourceRow?: T; readonly context: DataGridContextMenuContext<T>}DataGridColumnSchemaAction
Section titled “DataGridColumnSchemaAction”export type DataGridColumnSchemaAction = | 'insertLeft' | 'insertRight' | 'duplicate';DataGridColumnSchemaContext
Section titled “DataGridColumnSchemaContext”interface DataGridColumnSchemaContext { readonly action: DataGridColumnSchemaAction; readonly sourceColumn: ColumnRegular; readonly context: DataGridContextMenuContext<T>}DataGridColumnSchemaConfig
Section titled “DataGridColumnSchemaConfig”interface DataGridColumnSchemaConfig { /** Must return a column with an application-owned, unique `prop`. */ createColumn( context: DataGridColumnSchemaContext<T>, ): ColumnRegular | null | undefined}DataGridContextMenuLocaleText
Section titled “DataGridContextMenuLocaleText”interface DataGridContextMenuLocaleText { readonly ariaLabel: string; readonly unavailable: string; readonly labels: Record<DataGridContextMenuItemId, string>; readonly states: { readonly rowGroupExpand: string; readonly rowGroupCollapse: string; readonly rowGroupDeselectDescendants: string; readonly columnGroupExpand: string; readonly columnGroupCollapse: string; }}DataGridContextMenuConfig
Section titled “DataGridContextMenuConfig”interface DataGridContextMenuConfig { /** Enable or disable complete semantic surfaces. */ readonly areas?: Partial<Record<DataGridContextMenuSurface, boolean>>; /** Keep application-provided row/column context-menu items. Defaults to true. */ readonly includeHostItems?: boolean; /** Hide individual generated items by stable id. */ readonly hiddenItems?: Partial<Record< DataGridContextMenuItemId, DataGridContextMenuStateResolver<T> >>; /** Disable individual generated items by stable id. */ readonly disabledItems?: Partial<Record< DataGridContextMenuItemId, DataGridContextMenuStateResolver<T> >>; /** Extra items appended after the resolved generated defaults. */ readonly items?: readonly ContextMenuItem[] | DataGridContextMenuItemsFactory<T>; /** Replace or transform the generated defaults for the current surface. */ readonly getItems?: DataGridContextMenuItemsResolver<T>; /** Label and accessible-name overrides. */ readonly localeText?: Partial<Omit<DataGridContextMenuLocaleText, 'labels' | 'states'>> & { readonly labels?: Partial<Record<DataGridContextMenuItemId, string>>; readonly states?: Partial<DataGridContextMenuLocaleText['states']>; }; /** Defaults to hiding capability-dependent items. */ readonly unavailableItems?: 'hide' | 'disable'; /** Replace the default implementation for individual built-in commands. */ readonly commandHandlers?: Partial<Record< DataGridContextMenuCommandId, DataGridContextMenuCommandHandler<T> >>; /** Creates authored rows for insertion and duplication. */ readonly createRow?: (context: DataGridCreateRowContext<T>) => T; /** Enables local row pin/unpin commands. Defaults to false. */ readonly rowPinning?: boolean; /** Enables application-owned column schema commands. Defaults to false. */ readonly columnSchema?: false | DataGridColumnSchemaConfig<T>; /** Spreadsheet-style cell and column formatting. Set to false to hide it. */ readonly formatting?: false | DataGridFormattingConfig<T>; /** Read-only cell and column inspection. Full row and column data are opt-in. */ readonly inspection?: false | DataGridCellInspectorConfig<T>}DataGridContextMenuColumnProp
Section titled “DataGridContextMenuColumnProp”export type DataGridContextMenuColumnProp = ColumnProp;DataGridContextMenuCommandDetail
Section titled “DataGridContextMenuCommandDetail”interface DataGridContextMenuCommandDetail { readonly id: DataGridContextMenuCommandId; readonly context: DataGridContextMenuContext<T>}DataGridContextMenuErrorDetail (Extended from index.ts)
Section titled “DataGridContextMenuErrorDetail (Extended from index.ts)”interface DataGridContextMenuErrorDetail { readonly error: unknown}DATA_GRID_CONTEXT_MENU_COMMAND_EVENT
Section titled “DATA_GRID_CONTEXT_MENU_COMMAND_EVENT”DATA_GRID_CONTEXT_MENU_COMMAND_EVENT: string;DATA_GRID_CONTEXT_MENU_ERROR_EVENT
Section titled “DATA_GRID_CONTEXT_MENU_ERROR_EVENT”DATA_GRID_CONTEXT_MENU_ERROR_EVENT: string;ownsDataGridProjectedRows
Section titled “ownsDataGridProjectedRows”export function ownsDataGridProjectedRows( plugin: unknown,): plugin is DataGridContextMenuExternalRowOwner;DATA_GRID_CONTEXT_MENU_EXTERNAL_ROW_OWNER
Section titled “DATA_GRID_CONTEXT_MENU_EXTERNAL_ROW_OWNER”Cross-package marker for plugins that own a projected row lifecycle.
The universal menu may still contribute copy, export, and view commands, but local cell/row mutations require an application command handler while a marked owner is active.
DATA_GRID_CONTEXT_MENU_EXTERNAL_ROW_OWNER: typeof DATA_GRID_CONTEXT_MENU_EXTERNAL_ROW_OWNER;DataGridContextMenuExternalRowOwner
Section titled “DataGridContextMenuExternalRowOwner”interface DataGridContextMenuExternalRowOwner { readonly [DATA_GRID_CONTEXT_MENU_EXTERNAL_ROW_OWNER]: true}createDataGridContextMenuLocale
Section titled “createDataGridContextMenuLocale”export function createDataGridContextMenuLocale( config?: DataGridContextMenuConfig['localeText'],): DataGridContextMenuLocaleText;DATA_GRID_CONTEXT_MENU_LOCALE
Section titled “DATA_GRID_CONTEXT_MENU_LOCALE”DATA_GRID_CONTEXT_MENU_LOCALE: { ariaLabel: string; unavailable: string; labels: { 'menu.copy': string; 'menu.rows': string; 'menu.filter': string; 'menu.export': string; 'menu.sort': string; 'menu.grouping': string; 'menu.pin': string; 'menu.move': string; 'menu.size': string; 'menu.schema': string; 'menu.format': string; 'cell.edit': string; 'cell.inspect': string; 'cell.clear': string; 'clipboard.cut': string; 'clipboard.copy': string; 'clipboard.copyCell': string; 'clipboard.copyWithHeaders': string; 'clipboard.paste': string; 'row.copy': string; 'row.copyWithHeaders': string; 'row.clear': string; 'row.insertAbove': string; 'row.insertBelow': string; 'row.duplicate': string; 'row.delete': string; 'row.pinTop': string; 'row.pinBottom': string; 'row.unpin': string; 'rowGroup.toggle': string; 'rowGroup.expandAll': string; 'rowGroup.collapseAll': string; 'rowGroup.selectDescendants': string; 'rowGroup.copy': string; 'rowGroup.copyWithHeaders': string; 'rowGroup.exportCsv': string; 'rowGroup.removeField': string; 'rowGroup.clearGrouping': string; 'filter.keepOnly': string; 'filter.exclude': string; 'filter.open': string; 'filter.clear': string; 'column.copy': string; 'column.copyWithHeader': string; 'column.inspect': string; 'column.sortAscending': string; 'column.sortDescending': string; 'column.clearSort': string; 'column.filterOpen': string; 'column.filterClear': string; 'column.groupBy': string; 'column.ungroup': string; 'column.pinLeft': string; 'column.pinRight': string; 'column.unpin': string; 'column.moveLeft': string; 'column.moveRight': string; 'column.moveStart': string; 'column.moveEnd': string; 'column.autoSize': string; 'column.autoSizeAll': string; 'column.resetWidth': string; 'column.hide': string; 'column.manage': string; 'column.insertLeft': string; 'column.insertRight': string; 'column.duplicate': string; 'column.delete': string; 'column.exportCsv': string; 'columnGroup.toggle': string; 'columnGroup.autoSize': string; 'columnGroup.hide': string; 'format.automatic': string; 'format.number': string; 'format.currency': string; 'format.accounting': string; 'format.percent': string; 'format.scientific': string; 'format.date': string; 'format.datetime': string; 'format.time': string; 'format.more': string; 'format.clear': string; 'export.selectionCsv': string; 'export.rowsCsv': string; 'export.allCsv': string; 'export.allExcel': string; }; states: { rowGroupExpand: string; rowGroupCollapse: string; rowGroupDeselectDescendants: string; columnGroupExpand: string; columnGroupCollapse: string; };};resolveDataGridContextMenuContext
Section titled “resolveDataGridContextMenuContext”Compose independently resolved surface, selection, row, and column targets.
export function resolveDataGridContextMenuContext( menu: ContextMenuOpenContext,): DataGridContextMenuContext;isDataGridContextMenuGroupExpanded
Section titled “isDataGridContextMenuGroupExpanded”export function isDataGridContextMenuGroupExpanded( context: DataGridContextMenuContext,): boolean;getVisibleColumns
Section titled “getVisibleColumns”export function getVisibleColumns(providers: PluginProviders): ColumnRegular[];resolveDataGridContextMenuSurface
Section titled “resolveDataGridContextMenuSurface”export function resolveDataGridContextMenuSurface( menu: ContextMenuOpenContext,): DataGridContextMenuSurface;DataGridContextMenuCommands
Section titled “DataGridContextMenuCommands”Owns the command lifecycle only. Individual command behavior and capability
checks live in the focused modules under commands/.
class DataGridContextMenuCommands { isAvailable( id: DataGridContextMenuCommandId, context: DataGridContextMenuContext<T>, ): boolean;
getAvailability( id: DataGridContextMenuCommandId, context: DataGridContextMenuContext<T>, ): DataGridContextMenuCommandAvailability;
isColumnGroupCollapsed(context: DataGridContextMenuContext<T>): boolean;
areRowGroupDescendantsSelected(context: DataGridContextMenuContext<T>): boolean;
async execute( id: DataGridContextMenuCommandId, context: DataGridContextMenuContext<T>, ): Promise<void>;}buildDataGridContextMenuItems
Section titled “buildDataGridContextMenuItems”Apply configuration around the generated items for one semantic surface.
export function buildDataGridContextMenuItems<T extends DataType = DataType>( context: DataGridContextMenuContext<T>, config: DataGridContextMenuConfig<T>, commands: DataGridContextMenuCommands<T>,): ContextMenuItem[];createCellCommands
Section titled “createCellCommands”export function createCellCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;serializeTsv
Section titled “serializeTsv”export function serializeTsv( matrix: readonly (readonly DataFormat[])[],): string;parseTsv
Section titled “parseTsv”export function parseTsv(value: string): string[][];parseHtmlTable
Section titled “parseHtmlTable”export function parseHtmlTable(value: string): string[][] | null;canWriteClipboard
Section titled “canWriteClipboard”export function canWriteClipboard(): boolean;canReadClipboard
Section titled “canReadClipboard”export function canReadClipboard(): boolean;writeClipboardTransfer
Section titled “writeClipboardTransfer”export async function writeClipboardTransfer( transfer: DataTransfer, fallbackText: string,): Promise<void>;readClipboardTransfer
Section titled “readClipboardTransfer”export async function readClipboardTransfer(): Promise<DataTransfer>;createClipboardEvent
Section titled “createClipboardEvent”export function createClipboardEvent(transfer: DataTransfer): ClipboardEvent;createClipboardCommands
Section titled “createClipboardCommands”export function createClipboardCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createColumnGroupCommands
Section titled “createColumnGroupCommands”export function createColumnGroupCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;isColumnGroupCollapsed
Section titled “isColumnGroupCollapsed”export function isColumnGroupCollapsed<T extends DataType>( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>,): boolean;createColumnPositionCommands
Section titled “createColumnPositionCommands”export function createColumnPositionCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createColumnSchemaCommands
Section titled “createColumnSchemaCommands”export function createColumnSchemaCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createColumnSizingCommands
Section titled “createColumnSizingCommands”export function createColumnSizingCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createColumnStateCommands
Section titled “createColumnStateCommands”export function createColumnStateCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;cloneColumnTree
Section titled “cloneColumnTree”export function cloneColumnTree( columns: readonly AuthoredColumn[],): AuthoredColumn[];flattenColumnTree
Section titled “flattenColumnTree”export function flattenColumnTree( columns: readonly AuthoredColumn[],): ColumnRegular[];findColumn
Section titled “findColumn”export function findColumn( columns: AuthoredColumn[], prop: ColumnProp,): FoundColumn | undefined;removeColumn
Section titled “removeColumn”export function removeColumn( columns: AuthoredColumn[], prop: ColumnProp,): boolean;AuthoredColumn
Section titled “AuthoredColumn”export type AuthoredColumn = ColumnGrouping | ColumnRegular;FoundColumn
Section titled “FoundColumn”interface FoundColumn { parent: AuthoredColumn[]; index: number; column: ColumnRegular}createColumnVisibilityCommands
Section titled “createColumnVisibilityCommands”export function createColumnVisibilityCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createCommandRegistry
Section titled “createCommandRegistry”The only place where independent built-in command domains are composed.
export function createCommandRegistry<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;VisibleColumnLocation
Section titled “VisibleColumnLocation”interface VisibleColumnLocation { type: DimensionCols; index: number; physicalIndex: number}DataGridContextMenuCommandRuntime
Section titled “DataGridContextMenuCommandRuntime”Shared access to grid-owned state used by independent command domains.
class DataGridContextMenuCommandRuntime { getPlugin<C>(plugin: new (...args: any[]) => C): C | undefined;
hasHandler(id: DataGridContextMenuCommandId): boolean;
hasRemoteRows(): boolean;
actionContext(context: DataGridContextMenuContext<T>): ContextMenuActionContext;
sourceFor(type: DimensionRows): T[];
visibleSourceFor(type: DimensionRows): T[];
projectedSourceFor(type: DimensionRows): T[];
setSource(type: DimensionRows, source: T[]): void;
/** Resolve a projected/grouped target back to the application-authored row. */ authoredRow(row: DataGridContextMenuRow<T>): T | undefined;
authoredColumns(): AuthoredColumn[];
setColumns(columns: AuthoredColumn[]): void;
allVisibleColumns(): ColumnRegular[];
findVisibleColumn(prop: ColumnProp): VisibleColumnLocation | undefined;
removeCustomSizes( type: DimensionRows | DimensionCols, indexes: readonly number[], ): void;
hasCustomSize(type: DimensionRows | DimensionCols, index: number): boolean;}mergeCommandDefinitions
Section titled “mergeCommandDefinitions”export function mergeCommandDefinitions<T extends DataType>( ...groups: DataGridContextMenuCommandDefinitions<T>[]): DataGridContextMenuCommandDefinitions<T>;DataGridContextMenuCommandAvailability
Section titled “DataGridContextMenuCommandAvailability”export type DataGridContextMenuCommandAvailability = | 'available' | 'disabled' | 'hidden' | 'unavailable';DataGridContextMenuCommandDefinition
Section titled “DataGridContextMenuCommandDefinition”interface DataGridContextMenuCommandDefinition { isAvailable( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>, ): boolean; getState?( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>, ): Exclude<DataGridContextMenuCommandAvailability, 'unavailable'>; execute( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>, ): void | Promise<void>}DataGridContextMenuCommandDefinitions
Section titled “DataGridContextMenuCommandDefinitions”export type DataGridContextMenuCommandDefinitions<T extends DataType = DataType> = Partial<Record<DataGridContextMenuCommandId, DataGridContextMenuCommandDefinition<T>>>;createCellMatrix
Section titled “createCellMatrix”export function createCellMatrix<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>, context: DataGridContextMenuContext<T>, headers: boolean,): DataFormat[][];createRowMatrix
Section titled “createRowMatrix”export function createRowMatrix<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>, context: DataGridContextMenuContext<T>, headers: boolean,): DataFormat[][];createColumnMatrix
Section titled “createColumnMatrix”export function createColumnMatrix<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>, context: DataGridContextMenuContext<T>, headers: boolean,): DataFormat[][];clearContext
Section titled “clearContext”export function clearContext<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>, context: DataGridContextMenuContext<T>,): void;clearRows
Section titled “clearRows”Clear full visible rows while retaining the row span resolved from selection.
export function clearRows<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>, context: DataGridContextMenuContext<T>,): void;applyPasteMatrix
Section titled “applyPasteMatrix”export function applyPasteMatrix<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>, context: DataGridContextMenuContext<T>, matrix: DataFormat[][],): void;dispatchRangeEdit
Section titled “dispatchRangeEdit”export function dispatchRangeEdit( revogrid: HTMLRevoGridElement, detail: BeforeRangeSaveDataDetails,): void;createExportCommands
Section titled “createExportCommands”export function createExportCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createFilterCommands
Section titled “createFilterCommands”export function createFilterCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;resolveFormattingTarget
Section titled “resolveFormattingTarget”Resolve spreadsheet selection semantics independently from command dispatch.
export function resolveFormattingTarget<T extends DataType>( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>,): ResolvedFormattingTarget<T> | undefined;getFormattingConfig
Section titled “getFormattingConfig”export function getFormattingConfig<T extends DataType>( runtime: DataGridContextMenuCommandRuntime<T>,): DataGridFormattingConfig<T> | undefined;ResolvedFormattingTarget
Section titled “ResolvedFormattingTarget”interface ResolvedFormattingTarget { readonly selection: DataGridFormattingSelection<T>; readonly valueKind: DataGridFormattingValueKind; readonly canFormatValue: boolean}createFormattingCommands
Section titled “createFormattingCommands”export function createFormattingCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createInspectionCommands
Section titled “createInspectionCommands”export function createInspectionCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;isInvokedCellReadOnly
Section titled “isInvokedCellReadOnly”Evaluate the invoked cell with the same schema contract used by core editing.
export function isInvokedCellReadOnly<T extends DataType>( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>,): boolean;hasWritableContextCell
Section titled “hasWritableContextCell”True when at least one resolved cell target can accept an edit.
export function hasWritableContextCell<T extends DataType>( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>,): boolean;isGridReadOnly
Section titled “isGridReadOnly”export function isGridReadOnly<T extends DataType>( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>,): boolean;isResolvedCellReadOnly
Section titled “isResolvedCellReadOnly”export function isResolvedCellReadOnly<T extends DataType>( row: DataGridContextMenuRow<T>, column: ColumnRegular, runtime: DataGridContextMenuCommandRuntime<T>,): boolean;createRowGroupCommands
Section titled “createRowGroupCommands”export function createRowGroupCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;areAllRowGroupDescendantsSelected
Section titled “areAllRowGroupDescendantsSelected”export function areAllRowGroupDescendantsSelected<T extends DataType>( context: DataGridContextMenuContext<T>, runtime: DataGridContextMenuCommandRuntime<T>,): boolean;createRowLayoutCommands
Section titled “createRowLayoutCommands”export function createRowLayoutCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;createRowMutationCommands
Section titled “createRowMutationCommands”export function createRowMutationCommands<T extends DataType>(): DataGridContextMenuCommandDefinitions<T>;resolveDataGridContextMenuColumns
Section titled “resolveDataGridContextMenuColumns”export function resolveDataGridContextMenuColumns( menu: ContextMenuOpenContext, surface: DataGridContextMenuSurface, columnType?: DimensionCols, range?: RangeArea,): ColumnRegular[];resolveColumnPhysicalIndex
Section titled “resolveColumnPhysicalIndex”export function resolveColumnPhysicalIndex( menu: ContextMenuOpenContext, columnType?: DimensionCols,): number | undefined;resolveColumnSize
Section titled “resolveColumnSize”export function resolveColumnSize( menu: ContextMenuOpenContext, columnType?: DimensionCols,): number | undefined;resolveDataGridContextMenuRows
Section titled “resolveDataGridContextMenuRows”export function resolveDataGridContextMenuRows( menu: Extract<ContextMenuOpenContext, { target: 'row' }>, surface: DataGridContextMenuSurface, rowType: DimensionRows, range?: RangeArea,): DataGridContextMenuRow[];resolveInvokedSelectionRange
Section titled “resolveInvokedSelectionRange”export function resolveInvokedSelectionRange( menu: Extract<ContextMenuOpenContext, { target: 'row' }>, columnType?: DimensionCols,): RangeArea | undefined;normalizeDataColumnType
Section titled “normalizeDataColumnType”export function normalizeDataColumnType( type: unknown,): DimensionCols | undefined;CELL_CLIPBOARD_ICONS
Section titled “CELL_CLIPBOARD_ICONS”CELL_CLIPBOARD_ICONS: { 'cell.edit': string; 'cell.inspect': string; 'cell.clear': string; 'clipboard.cut': string; 'clipboard.copy': string; 'clipboard.copyCell': string; 'clipboard.copyWithHeaders': string; 'clipboard.paste': string;};getColumnGroupToggleIcon
Section titled “getColumnGroupToggleIcon”export function getColumnGroupToggleIcon( state: DataGridContextMenuIconState,): string;COLUMN_GROUP_ICONS
Section titled “COLUMN_GROUP_ICONS”COLUMN_GROUP_ICONS: { 'columnGroup.autoSize': string; 'columnGroup.hide': string;};COLUMN_ICONS
Section titled “COLUMN_ICONS”COLUMN_ICONS: { 'column.copy': string; 'column.copyWithHeader': string; 'column.inspect': string; 'column.sortAscending': string; 'column.sortDescending': string; 'column.clearSort': string; 'column.groupBy': string; 'column.ungroup': string; 'column.pinLeft': string; 'column.pinRight': string; 'column.unpin': string; 'column.moveLeft': string; 'column.moveRight': string; 'column.moveStart': string; 'column.moveEnd': string; 'column.autoSize': string; 'column.autoSizeAll': string; 'column.resetWidth': string; 'column.hide': string; 'column.manage': string; 'column.insertLeft': string; 'column.insertRight': string; 'column.duplicate': string; 'column.delete': string;};EXPORT_ICONS
Section titled “EXPORT_ICONS”EXPORT_ICONS: { 'column.exportCsv': string; 'export.selectionCsv': string; 'export.rowsCsv': string; 'export.allCsv': string; 'export.allExcel': string;};FILTER_ICONS
Section titled “FILTER_ICONS”FILTER_ICONS: { 'filter.keepOnly': string; 'filter.exclude': string; 'filter.open': string; 'filter.clear': string; 'column.filterOpen': string; 'column.filterClear': string;};FORMATTING_ICONS
Section titled “FORMATTING_ICONS”FORMATTING_ICONS: { 'menu.format': string; 'format.automatic': string; 'format.number': string; 'format.currency': string; 'format.accounting': string; 'format.percent': string; 'format.scientific': string; 'format.date': string; 'format.datetime': string; 'format.time': string; 'format.more': string; 'format.clear': string;};resolveDataGridContextMenuIcon
Section titled “resolveDataGridContextMenuIcon”export function resolveDataGridContextMenuIcon( id: DataGridContextMenuItemId, state: DataGridContextMenuIconState,): string | undefined;DataGridContextMenuIconMap
Section titled “DataGridContextMenuIconMap”export type DataGridContextMenuIconMap = Partial<Record< DataGridContextMenuItemId, string>>;DataGridContextMenuIconState
Section titled “DataGridContextMenuIconState”interface DataGridContextMenuIconState { readonly rowGroupExpanded: boolean; readonly columnGroupCollapsed: boolean}MENU_ICONS
Section titled “MENU_ICONS”MENU_ICONS: { 'menu.copy': string; 'menu.rows': string; 'menu.filter': string; 'menu.export': string; 'menu.sort': string; 'menu.grouping': string; 'menu.pin': string; 'menu.move': string; 'menu.size': string; 'menu.schema': string;};getRowGroupToggleIcon
Section titled “getRowGroupToggleIcon”export function getRowGroupToggleIcon( state: DataGridContextMenuIconState,): string;ROW_GROUP_ICONS
Section titled “ROW_GROUP_ICONS”ROW_GROUP_ICONS: { 'rowGroup.expandAll': string; 'rowGroup.collapseAll': string; 'rowGroup.selectDescendants': string; 'rowGroup.copy': string; 'rowGroup.copyWithHeaders': string; 'rowGroup.exportCsv': string; 'rowGroup.removeField': string; 'rowGroup.clearGrouping': string;};ROW_ICONS
Section titled “ROW_ICONS”ROW_ICONS: { 'row.copy': string; 'row.copyWithHeaders': string; 'row.clear': string; 'row.insertAbove': string; 'row.insertBelow': string; 'row.duplicate': string; 'row.delete': string; 'row.pinTop': string; 'row.pinBottom': string; 'row.unpin': string;};buildMenuItem
Section titled “buildMenuItem”export function buildMenuItem<T extends DataType>( spec: DataGridMenuItemSpec, context: DataGridContextMenuContext<T>, config: DataGridContextMenuConfig<T>, commands: DataGridContextMenuCommands<T>, locale: DataGridContextMenuLocaleText, iconState: DataGridContextMenuIconState,): ContextMenuItem[];createMenuSections
Section titled “createMenuSections”Flattens named task sections into menu specs separated by the shared Context Menu divider primitive. Runtime normalization removes dividers around hidden or unavailable sections.
export function createMenuSections( sections: readonly DataGridMenuSection[],): DataGridMenuItemSpec[];DataGridMenuSection
Section titled “DataGridMenuSection”export type DataGridMenuSection = { /** Semantic section name used only to identify its internal divider. */ readonly id: string; readonly items: readonly DataGridMenuItemSpec[];};isMenuSeparatorSpec
Section titled “isMenuSeparatorSpec”export function isMenuSeparatorSpec( spec: DataGridMenuItemSpec,): spec is DataGridMenuSeparatorSpec;collectMenuItemIds
Section titled “collectMenuItemIds”export function collectMenuItemIds( specs: readonly DataGridMenuItemSpec[],): readonly DataGridContextMenuItemId[];DataGridMenuCommandSpec
Section titled “DataGridMenuCommandSpec”export type DataGridMenuCommandSpec = { id: DataGridContextMenuItemId; children: readonly DataGridMenuItemSpec[];};DataGridMenuSeparatorSpec
Section titled “DataGridMenuSeparatorSpec”export type DataGridMenuSeparatorSpec = { kind: 'separator'; id: string;};DataGridMenuItemSpec
Section titled “DataGridMenuItemSpec”export type DataGridMenuItemSpec = | DataGridContextMenuItemId | DataGridMenuCommandSpec | DataGridMenuSeparatorSpec;getSurfaceItemSpecs
Section titled “getSurfaceItemSpecs”export function getSurfaceItemSpecs( surface: DataGridContextMenuSurface,): readonly DataGridMenuItemSpec[];CELL_CLIPBOARD_ITEMS
Section titled “CELL_CLIPBOARD_ITEMS”CELL_CLIPBOARD_ITEMS: DataGridMenuItemSpec[];COLUMN_CLIPBOARD_ITEMS
Section titled “COLUMN_CLIPBOARD_ITEMS”COLUMN_CLIPBOARD_ITEMS: DataGridMenuItemSpec[];COLUMN_SORT_ITEMS
Section titled “COLUMN_SORT_ITEMS”COLUMN_SORT_ITEMS: DataGridMenuItemSpec[];COLUMN_GROUPING_ITEMS
Section titled “COLUMN_GROUPING_ITEMS”COLUMN_GROUPING_ITEMS: DataGridMenuItemSpec[];COLUMN_PIN_ITEMS
Section titled “COLUMN_PIN_ITEMS”COLUMN_PIN_ITEMS: DataGridMenuItemSpec[];COLUMN_MOVE_ITEMS
Section titled “COLUMN_MOVE_ITEMS”COLUMN_MOVE_ITEMS: DataGridMenuItemSpec[];COLUMN_SIZE_ITEMS
Section titled “COLUMN_SIZE_ITEMS”COLUMN_SIZE_ITEMS: DataGridMenuItemSpec[];COLUMN_SCHEMA_ITEMS
Section titled “COLUMN_SCHEMA_ITEMS”COLUMN_SCHEMA_ITEMS: DataGridMenuItemSpec[];CELL_EXPORT_ITEMS
Section titled “CELL_EXPORT_ITEMS”CELL_EXPORT_ITEMS: DataGridMenuItemSpec[];ROW_HEADER_EXPORT_ITEMS
Section titled “ROW_HEADER_EXPORT_ITEMS”ROW_HEADER_EXPORT_ITEMS: DataGridMenuItemSpec[];COLUMN_EXPORT_ITEMS
Section titled “COLUMN_EXPORT_ITEMS”COLUMN_EXPORT_ITEMS: DataGridMenuItemSpec[];CELL_FILTER_ITEMS
Section titled “CELL_FILTER_ITEMS”CELL_FILTER_ITEMS: DataGridMenuItemSpec[];COLUMN_FILTER_ITEMS
Section titled “COLUMN_FILTER_ITEMS”COLUMN_FILTER_ITEMS: DataGridMenuItemSpec[];FORMAT_CONTEXT_MENU_ITEMS
Section titled “FORMAT_CONTEXT_MENU_ITEMS”FORMAT_CONTEXT_MENU_ITEMS: DataGridMenuItemSpec[];CELL_ROW_ITEMS
Section titled “CELL_ROW_ITEMS”CELL_ROW_ITEMS: DataGridMenuItemSpec[];ROW_HEADER_ROW_ITEMS
Section titled “ROW_HEADER_ROW_ITEMS”ROW_HEADER_ROW_ITEMS: DataGridMenuItemSpec[];ROW_PIN_ITEMS
Section titled “ROW_PIN_ITEMS”ROW_PIN_ITEMS: DataGridMenuItemSpec[];CELL_CONTEXT_MENU_ITEMS
Section titled “CELL_CONTEXT_MENU_ITEMS”CELL_CONTEXT_MENU_ITEMS: DataGridMenuItemSpec[];COLUMN_GROUP_HEADER_CONTEXT_MENU_ITEMS
Section titled “COLUMN_GROUP_HEADER_CONTEXT_MENU_ITEMS”COLUMN_GROUP_HEADER_CONTEXT_MENU_ITEMS: DataGridMenuItemSpec[];COLUMN_HEADER_CONTEXT_MENU_ITEMS
Section titled “COLUMN_HEADER_CONTEXT_MENU_ITEMS”COLUMN_HEADER_CONTEXT_MENU_ITEMS: DataGridMenuItemSpec[];ROW_GROUP_CONTEXT_MENU_ITEMS
Section titled “ROW_GROUP_CONTEXT_MENU_ITEMS”ROW_GROUP_CONTEXT_MENU_ITEMS: DataGridMenuItemSpec[];ROW_HEADER_CONTEXT_MENU_ITEMS
Section titled “ROW_HEADER_CONTEXT_MENU_ITEMS”ROW_HEADER_CONTEXT_MENU_ITEMS: DataGridMenuItemSpec[];