The HTML canvas element to render the grid on, or a string selector for the canvas element
The grid definition containing schema server and subgrid configurations
The grid settings object of type BGS
Event handler for obtaining settings when new columns are created
Optionaloptions: RevGridOptions<Optional configuration options for the grid including ID, external parent, canvas overlay, and UI controller definitions
This constructor initializes all the core grid components including:
The schema server can be provided as either an instance or a constructor function. A unique ID is generated for the grid instance using the provided options.
ReadonlycanvasReadonlyclientReadonlycolumnsReadonlyexternalReadonlyfocusReadonlyhorizontalReadonlyidReadonlyinternalReadonlymainReadonlymainReadonlymouseReadonlyrendererReadonlyschemaReadonlyselectionReadonlysettingsReadonlysubgridsReadonlyverticalReadonlyviewThe index of the active column which is first in view (either on left or right depending on Grid alignment)
The number of pixels that the scroll anchored column is offset. Changes to allow smooth scrolling
OptionalincludeDynamicAll: booleanOptionalincludeDynamicAll: booleanOptionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalincludeDynamicAll: booleanCall before multiple selection changes to consolidate SelectionChange events. Pair with endSelectionChange().
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Removes a columns from the selection.
The list of column selection areas will be updated to reflect the necessary deletion, splitting or resizing required.
The index of the active column to remove.
Removes a range of columns from the selection.
The list of column selection areas will be updated to reflect the necessary deletion, splitting or resizing required.
The start index of the range of active columns to deselect if count is positive, or the exclusive end index if count is negative.
The number of columns to deselect. If negative, count is in reverse direction from the exclusive end index.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Be a responsible citizen and call this function on instance disposal!
If multiple grids are used in an application (simultaneously or not), then destroy() must be called otherwise
canvase paint loop will continue to run
Call after multiple selection changes to consolidate SelectionChange events. Pair with beginSelectionChange().
Find cell under offset position in canvas
X position of pixel in canvas.
Y position of pixel in canvas.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalensureFullyInView: RevEnsureFullyInViewEnumOptionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalensureFullyInView: RevEnsureFullyInViewEnumOptionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalensureFullyInView: RevEnsureFullyInViewEnumOptionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalensureFullyInView: RevEnsureFullyInViewEnumOptionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalensureFullyInView: RevEnsureFullyInViewEnumOptionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalensureFullyInView: RevEnsureFullyInViewEnumOptionalbegin: numberOptionalend: numberA copy of the active columns array by passing the params to Array.prototype.slice.
Data x coordinate.
The properties for a specific column.
The untranslated column index.
The width of the given column.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>The pixel location of the mouse in physical grid coordinates.
The pixel based bounds rectangle given a data cell point.
Optionalbegin: numberOptionalend: numberA copy of the all columns array by passing the params to Array.prototype.slice.
The HiDPI ratio.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>The row index.
The height of the given (recently rendered) row.
The column index.
The width of the given (recently rendered) column.
The untranslated fixed column index.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>The height of the given row
OptionalincludeDynamicAll: booleanOptionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalincludeDynamicAll: booleanOptionalincludeDynamicAll: booleanOptionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Retrieve a data row from the main data model.
the row index of interest
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>The data row object at y index.
Gets the number of rows in the main subgrid.
The number of rows.
Objects with the values that were just rendered.
Retrieve all data rows from the data model. Use with caution!
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalui: booleanCheck if the specified active column is in the viewport.
The index of the active column to be checked.
true if the active column is in the viewport, otherwise false.
We have focus.
The column index in question.
The grid row index in question.
Optionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>The given cell is fully is visible.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Returns undefined if not selected, false if selected with others, true if the only cell selected
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>OptionalselectedType: "dynamicAll" | "rectangle" | "row" | "column"Get the visibility of the row matching the provided data row index.
The data row index.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>The given row is visible.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Reset all components, resize and invalidate all
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Set the width of the given column.
Column or index of active column whose width is to be set.
The width in pixels.
Whether this was instigated by a UI action
true if column width was changed
Set the height of the given row.
The row index.
The width in pixels.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Show inactive column(s) or move active column(s).
A column index or array of field indices which are to be shown or hidden.
OptionalinsertIndex: numberActive index of column to insert before. Set to undefined to add new active columns at end of list. Set to -1 to hide specified columns.
OptionalallowDuplicateColumns: booleanIf true, then if an existing column is already visible, it will not be removed and duplicates of that column will be present. Default: false.
Optionalui: booleanWhether this was instigated by a UI action. Default: true.
Show inactive column(s) or move active column(s).
If true, then column indices specify active column indices. Otherwise field column indices.
OptionalfieldColumnIndexes: number | number[]A column index or array of indices. If undefined then all of the columns as per indexesAreActive.
OptionalinsertIndex: numberActive index of column to insert before. Set to undefined to add new active columns at end of list. Set to -1 to hide specified columns.
OptionalallowDuplicateColumns: booleanIf true, then if an existing column is already visible, it will not be removed and duplicates of that column will be present. Default: false.
Optionalui: booleanWhether this was instigated by a UI action. Default: true.
Enable/disable if this component can receive the focus.
Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalcell: RevViewCell<RevSimpleInMemoryBehavioredColumnSettings, SF>Optionalsubgrid: RevMainSubgrid<RevSimpleInMemoryBehavioredColumnSettings, SF>
Creates a new RevClientGrid instance.