Skip to content

RevoGrid Documentation v4.31.6 / Components / RevoGrid

Interface: RevoGrid ​

Revogrid - High-performance, customizable grid library for managing large datasets.

Events guide ​

For a comprehensive events guide, check the Events API Page. All events propagate to the root level of the grid. Dependency tree.

Type definitions ​

Read type definition file for the full interface information. All complex property types such as ColumnRegular, ColumnProp, ColumnDataSchemaModel can be found there.

HTMLRevoGridElement ​

Examples ​

ts
data-rgCol-rgRow - main data slot. Applies extra elements in <revogr-data />.
ts
focus-rgCol-rgRow - focus layer for main data. Applies extra elements in <revogr-focus />.

Properties ​

PropertyTypeDescriptionDefined in
accessiblebooleanEnable accessibility. If disabled, the grid will not be accessible. Default truesrc/components.d.ts:64
addTrimmed(trimmed: Record<number, boolean>, trimmedType?: string, type?: DimensionRows) => Promise<CustomEvent<{ trimmed: Record<number, boolean>; trimmedType: string; type: string; }>>Add trimmed by typesrc/components.d.ts:68
additionalDataAdditionalDataAdditional data to be passed to plugins, renders or editors. For example if you need to pass Vue component instance. Default {}src/components.d.ts:73
applyOnClosebooleanApply changes in editor when closed except 'Escape' cases. If custom editor in use method getValue required. Check interfaces.d.ts EditorBase for more info. Default falsesrc/components.d.ts:78
autoSizeColumnboolean | AutoSizeColumnConfigAutosize config. Enables columns autoSize. For more details check autoSizeColumn plugin. By default disabled, hence operation is not performance efficient. true to enable with default params (double header separator click for autosize). Or define config. See AutoSizeColumnConfig for more details. Default falsesrc/components.d.ts:83
canDragbooleanDisable native drag&drop plugin. Default truesrc/components.d.ts:88
canFocusbooleanWhen true cell focus appear. Default truesrc/components.d.ts:93
canMoveColumnsbooleanEnable column move plugin. Default falsesrc/components.d.ts:98
clearFocus() => Promise<void>Clear current grid focus. Grid has no longer focus on it.src/components.d.ts:102
clearSorting() => Promise<void>Clears column sortingsrc/components.d.ts:106
colSizenumberIndicates default column size. Default 100src/components.d.ts:111
columnTypes{}Column Types Format. Every type represent multiple column properties. Types will be merged but can be replaced with column properties. Types were made as separate objects to be reusable per multiple columns. Default {}src/components.d.ts:116
columns(ColumnRegular<ColumnProp, DataType<any, ColumnProp>> | ColumnGrouping<any>)[]Columns - defines an array of grid columns. Can be column or grouped column. Default []src/components.d.ts:121
disableVirtualXbooleanDisable lazy rendering mode for the X axis. Use when not many columns present and you don't need rerenader cells during scroll. Can be used for initial rendering performance improvement. Default falsesrc/components.d.ts:126
disableVirtualYbooleanDisable lazy rendering mode for the Y axis. Use when not many rows present and you don't need rerenader cells during scroll. Can be used for initial rendering performance improvement. Default falsesrc/components.d.ts:131
editorsEditorsCustom editors register. Default {}src/components.d.ts:136
exportingbooleanEnable export plugin. Default falsesrc/components.d.ts:141
filterboolean | ColumnFilterConfigEnables filter plugin. Disabled by default; set to true or a configuration object to enable. Can be boolean. Or can be filter collection See FilterCollection for more info. Default falsesrc/components.d.ts:146
focusTemplateFocusTemplateFuncApply changes typed in editor on editor close except Escape cases. If custom editor in use method getValue required. Check interfaces.d.ts EditorBase for more info.src/components.d.ts:150
frameSizenumberDefines how many rows/columns should be rendered outside visible area. Default 1src/components.d.ts:155
getColumnStore(type?: DimensionCols) => Promise<Observable<DSourceState<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, DimensionCols>>>Provides access to column internal store observer Can be used for plugin supportsrc/components.d.ts:160
getColumns() => Promise<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]>Receive all columns in data sourcesrc/components.d.ts:164
getContentSize() => Promise<Cell>Get size of content Including all pinned datasrc/components.d.ts:168
getFocused() => Promise<null | FocusedData>Get the currently focused cell.src/components.d.ts:172
getPlugins() => Promise<PluginBaseComponent[]>Get all active plugins instancessrc/components.d.ts:176
getProviders() => Promise<undefined | PluginProviders>Get all providers for grid Useful for external grid integrationsrc/components.d.ts:180
getSelectedRange() => Promise<null | RangeArea & AllDimensionType>Get the currently selected Range.src/components.d.ts:184
getSource(type?: DimensionRows) => Promise<DataType[]>Get data from sourcesrc/components.d.ts:188
getSourceStore(type?: DimensionRows) => Promise<Observable<DSourceState<DataType, DimensionRows>>>Provides access to rows internal store observer Can be used for plugin supportsrc/components.d.ts:193
getVisibleSource(type?: DimensionRows) => Promise<any[]>Get data from visible part of source Trimmed/filtered rows will be excludedsrc/components.d.ts:198
groupingGroupingOptionsGroup rows based on this property. Define properties to be groped by grouping plugin See GroupingOptions.src/components.d.ts:202
hideAttributionbooleanPlease only hide the attribution if you are subscribed to Pro version Default falsesrc/components.d.ts:207
jobsBeforeRenderPromise<any>[]Prevent rendering until job is done. Can be used for initial rendering performance improvement. When several plugins require initial rendering this will prevent double initial rendering. Default []src/components.d.ts:212
noHorizontalScrollTransferbooleanPrevents horizontal scroll state from being mirrored across viewport sections. Default falsesrc/components.d.ts:217
pinnedBottomSourceDataType[]Pinned bottom Source: {[T in ColumnProp]: any} - defines pinned bottom rows data source. Default []src/components.d.ts:222
pinnedTopSourceDataType[]Pinned top Source: {[T in ColumnProp]: any} - defines pinned top rows data source. Default []src/components.d.ts:227
pluginstypeof BasePlugin[]Custom grid plugins. Can be added or removed at runtime. Every plugin should be inherited from BasePlugin class. For more details check Plugin guide Default []src/components.d.ts:232
rangebooleanWhen true, user can select a cell range. Required for range-based clipboard fill. Default falsesrc/components.d.ts:237
readonlybooleanWhen true, grid in read only mode. Default falsesrc/components.d.ts:242
refresh(type?: DimensionRows | "all") => Promise<void>Refreshes data viewport. Can be specific part as rgRow or pinned rgRow or 'all' by default.src/components.d.ts:246
refreshExtraElements() => Promise<void>Refresh extra elements. Triggers re-rendering of extra elements and functions. Part of extraElements and registerVNode methods. Useful for plugins.src/components.d.ts:250
registerVNode(VNode | (c: ExtraNodeFuncConfig) => VNode)[]Register new virtual node inside of grid. Used for additional items creation such as plugin elements. Should be set before grid render inside of plugins. Can return VNode result of h() function or a function that returns VNode. Function can be used for performance improvement and additional renders. Default []src/components.d.ts:255
resizebooleanWhen true, columns are resizable. Default falsesrc/components.d.ts:263
resizeRowboolean | RowResizeConfigEnables row resizing. Pass a configuration object to customize the height limits or enable resize edges across the full row. Default falsesrc/components.d.ts:268
rowClassstringRow class property mapping. Map custom classes to rows from row object data. Define this property in rgRow object and this will be mapped as rgRow class. Default ''src/components.d.ts:273
rowDefinitionsRowDefinition[]Custom row properies to be applied. See RowDefinition for more info. Default []src/components.d.ts:278
rowHeadersboolean | RowHeadersExcel like functionality. Show row numbers. Also can be used for custom row header render if object provided.src/components.d.ts:282
rowSizenumberIndicates default rgRow size. By default 0, means theme package size will be applied Alternatively you can use rowSize to reset viewport Default 0src/components.d.ts:287
rtlbooleanEnable right-to-left (RTL) mode. When enabled, columns will be displayed from right to left. Default falsesrc/components.d.ts:292
scrollToColumnIndex(coordinate?: number) => Promise<void>Scrolls viewport to specified column by index.src/components.d.ts:296
scrollToColumnProp(prop: ColumnProp, dimension?: "rgCol") => Promise<void>Scrolls viewport to specified column by propsrc/components.d.ts:300
scrollToCoordinate(cell: Partial<Cell>) => Promise<void>Scrolls view port to coordinatesrc/components.d.ts:304
scrollToRow(coordinate?: number) => Promise<void>Scrolls viewport to specified row by index.src/components.d.ts:308
setCellEdit(rgRow: number, prop: ColumnProp, rowSource?: DimensionRows) => Promise<void>Open editor for cell.src/components.d.ts:312
setCellsFocus(cellStart?: Cell, cellEnd?: Cell, colType?: string, rowType?: string) => Promise<void>Set focus range.src/components.d.ts:316
setDataAt(__namedParameters: { col: number; row: number; skipDataUpdate: boolean; val: any; } & AllDimensionType) => Promise<undefined | void>Refreshes data at specified cell. Useful for performance optimization. No viewport update will be triggered. Example const grid = document.querySelector('revo-grid'); grid.setDataAt({ row: 0, col: 0, val: 'test' }); // refreshsrc/components.d.ts:321
sorting?SortingConfigAlternative way to set sorting. {columns: [{prop: 'name', order: 'asc'}]} Use SortingPlugin to get current sorting statesrc/components.d.ts:325
sourceDataType[]Source - defines main data source. Can be an Object or 2 dimensional array([][]); Keys/indexes referenced from columns Prop. Default []src/components.d.ts:330
stretchstring | booleanStretch strategy for columns by StretchColumn plugin. For example if there are more space on the right last column size would be increased. Default falsesrc/components.d.ts:335
themestringTheme name. Default 'default'src/components.d.ts:340
themeDefinitionsThemeDefinition[]Per-grid custom theme definitions. Assign as a JavaScript property; complex values cannot be serialized as HTML attributes. Default []src/components.d.ts:345
trimmedRowsRecord<number, boolean>Trimmed rows. Functionality which allows to hide rows from main data set. trimmedRows are physical rgRow indexes to hide. Default {}src/components.d.ts:350
updateColumnSorting(column: Pick<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, "prop" | "cellCompare">, order: undefined | "asc" | "desc", additive: boolean) => Promise<void>Update column sortingsrc/components.d.ts:357
updateColumns(cols: ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]) => Promise<void>Update columnssrc/components.d.ts:361
useClipboardboolean | ClipboardConfigWhen true enable clipboard. Can be boolean or clipboard config. Default truesrc/components.d.ts:366
virtualXDimensionCols[]Column dimensions that use X axis virtual rendering. Defaults to regular columns only to preserve pinned column behavior. Set to ['rgCol', 'colPinStart', 'colPinEnd'] to virtualize all column areas. Default ['rgCol']src/components.d.ts:371