GridElement

<vaadin-grid> is a free, high quality data grid / data table Web Component. The content of the the grid can be populated by using renderer callback function.

Quick Start

Start with an assigning an array to the #/elements/vaadin-grid#property-items property to visualize your data.

Use the #/elements/vaadin-grid-column element to configure the grid columns. Set path and header shorthand properties for the columns to define what gets rendered in the cells of the column.

Example:

<vaadin-grid>
<vaadin-grid-column path="name.first" header="First name"></vaadin-grid-column>
<vaadin-grid-column path="name.last" header="Last name"></vaadin-grid-column>
<vaadin-grid-column path="email"></vaadin-grid-column>
</vaadin-grid>

For custom content vaadin-grid-column element provides you with three types of renderer callback functions: headerRenderer, renderer and footerRenderer.

Each of those renderer functions provides root, column, model arguments when applicable. Generate DOM content, append it to the root element and control the state of the host element by accessing column. Before generating new content, users are able to check if there is already content in root for reusing it.

Renderers are called on initialization of new column cells and each time the related row model is updated. DOM generated during the renderer call can be reused in the next renderer call and will be provided with the root argument. On first call it will be empty.

Example:

<vaadin-grid>
<vaadin-grid-column></vaadin-grid-column>
<vaadin-grid-column></vaadin-grid-column>
<vaadin-grid-column></vaadin-grid-column>
</vaadin-grid>
const grid = document.querySelector('vaadin-grid');
grid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},
{'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];

const columns = grid.querySelectorAll('vaadin-grid-column');

columns[0].headerRenderer = function(root) {
root.textContent = 'Name';
};
columns[0].renderer = function(root, column, model) {
root.textContent = model.item.name;
};

columns[1].headerRenderer = function(root) {
root.textContent = 'Surname';
};
columns[1].renderer = function(root, column, model) {
root.textContent = model.item.surname;
};

columns[2].headerRenderer = function(root) {
root.textContent = 'Role';
};
columns[2].renderer = function(root, column, model) {
root.textContent = model.item.role;
};

The following properties are available in the model argument:

Property nameTypeDescription
indexNumberThe index of the item.
itemString or ObjectThe item.
levelNumberNumber of the item's tree sublevel, starts from 0.
expandedBooleanTrue if the item's tree sublevel is expanded.
selectedBooleanTrue if the item is selected.
detailsOpenedBooleanTrue if the item's row details are open.
hasChildrenBooleanTrue if the item has children

The following helper elements can be used for further customization:

  • #/elements/vaadin-grid-column-group

  • #/elements/vaadin-grid-filter

  • #/elements/vaadin-grid-sorter

  • #/elements/vaadin-grid-selection-column

  • #/elements/vaadin-grid-tree-toggle

Note that the helper elements must be explicitly imported. If you want to import everything at once you can use the all-imports.js entrypoint.

Lazy Loading with Function Data Provider

In addition to assigning an array to the items property, you can alternatively provide the <vaadin-grid> data through the #/elements/vaadin-grid#property-dataProvider function property. The <vaadin-grid> calls this function lazily, only when it needs more data to be displayed.

See the #/elements/vaadin-grid#property-dataProvider property documentation for the detailed data provider arguments description.

Note that expanding the tree grid's item will trigger a call to the dataProvider.

Also, note that when using function data providers, the total number of items needs to be set manually. The total number of items can be returned in the second argument of the data provider callback:

grid.dataProvider = ({page, pageSize}, callback) => {
// page: the requested page index
// pageSize: number of items on one page
const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;

fetch(url)
.then((res) => res.json())
.then(({ employees, totalSize }) => {
callback(employees, totalSize);
});
};

Alternatively, you can use the size property to set the total number of items:

grid.size = 200; // The total number of items
grid.dataProvider = ({page, pageSize}, callback) => {
const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;

fetch(url)
.then((res) => res.json())
.then((resJson) => callback(resJson.employees));
};

Styling

The following shadow DOM parts are available for styling:

Part nameDescription
rowRow in the internal table
body-rowBody row in the internal table
header-rowHeader row in the internal table
footer-rowFooter row in the internal table
collapsed-rowCollapsed row
expanded-rowExpanded row
selected-rowSelected row
nonselectable-rowRow that the user may not select or deselect
details-opened-rowRow with details open
odd-rowOdd row
even-rowEven row
first-rowThe first body row
first-header-rowThe first header row
first-footer-rowThe first footer row
last-rowThe last body row
last-header-rowThe last header row
last-footer-rowThe last footer row
dragstart-rowSet on the row for one frame when drag is starting.
dragover-above-rowSet on the row when the a row is dragged over above
dragover-below-rowSet on the row when the a row is dragged over below
dragover-on-top-rowSet on the row when the a row is dragged over on top
drag-disabled-rowSet to a row that isn't available for dragging
drop-disabled-rowSet to a row that can't be dropped on top of
cellCell in the internal table
header-cellHeader cell in the internal table
body-cellBody cell in the internal table
footer-cellFooter cell in the internal table
details-cellRow details cell in the internal table
focused-cellFocused cell in the internal table
odd-row-cellCell in an odd row
even-row-cellCell in an even row
first-row-cellCell in the first body row
last-row-cellCell in the last body row
first-header-row-cellCell in the first header row
first-footer-row-cellCell in the first footer row
last-header-row-cellCell in the last header row
last-footer-row-cellCell in the last footer row
loading-row-cellCell in a row that is waiting for data from data provider
selected-row-cellCell in a selected row
nonselectable-row-cellCell in a row that the user may not select or deselect
collapsed-row-cellCell in a collapsed row
expanded-row-cellCell in an expanded row
details-opened-row-cellCell in an row with details open
dragstart-row-cellCell in the ghost image row, but not in a source row
drag-source-row-cellCell in a source row, but not in the ghost image
dragover-above-row-cellCell in a row that has another row dragged over above
dragover-below-row-cellCell in a row that has another row dragged over below
dragover-on-top-row-cellCell in a row that has another row dragged over on top
drag-disabled-row-cellCell in a row that isn't available for dragging
drop-disabled-row-cellCell in a row that can't be dropped on top of
frozen-cellFrozen cell in the internal table
frozen-to-end-cellFrozen to end cell in the internal table
last-frozen-cellLast frozen cell
first-frozen-to-end-cellFirst cell frozen to end
first-column-cellFirst visible cell on a row
last-column-cellLast visible cell on a row
reorder-allowed-cellCell in a column where another column can be reordered
reorder-dragging-cellCell in a column currently being reordered
resize-handleHandle for resizing the columns
empty-stateThe container for the content to be displayed when there are no body rows to show
reorder-ghostGhost element of the header cell being dragged

The following state attributes are available for styling:

AttributeDescriptionPart name
loadingSet when the grid is loading data from data provider:host
interactingKeyboard navigation in interaction mode:host
navigatingKeyboard navigation in navigation mode:host
overflowSet when rows are overflowing the grid viewport. Possible values: top, bottom, start, end:host
reorderingSet when the grid's columns are being reordered:host
dragoverSet when the grid (not a specific row) is dragged over:host
dragging-rowsSet when grid rows are dragged:host
reorder-statusReflects the status of a cell while columns are being reorderedcell
frozenFrozen cellcell
frozen-to-endCell frozen to endcell
last-frozenLast frozen cellcell
first-frozen-to-endFirst cell frozen to endcell
first-columnFirst visible cell on a rowcell
last-columnLast visible cell on a rowcell
selectedSelected rowrow
expandedExpanded rowrow
details-openedRow with details openrow
loadingRow that is waiting for data from data providerrow
oddOdd rowrow
firstThe first body rowrow
lastThe last body rowrow
dragstartSet for one frame when starting to drag a row. The value is a number when dragging multiple rowsrow
dragoverSet when the row is dragged overrow
drag-disabledSet to a row that isn't available for draggingrow
drop-disabledSet to a row that can't be dropped on top ofrow

The following custom CSS properties are available for styling:

Custom CSS property
--vaadin-grid-background
--vaadin-grid-border-color
--vaadin-grid-border-radius
--vaadin-grid-border-width
--vaadin-grid-cell-background-color
--vaadin-grid-cell-padding
--vaadin-grid-cell-text-overflow
--vaadin-grid-column-border-width
--vaadin-grid-column-resize-handle-color
--vaadin-grid-header-font-size
--vaadin-grid-header-font-weight
--vaadin-grid-header-text-color
--vaadin-grid-row-background-color
--vaadin-grid-row-border-width
--vaadin-grid-row-highlight-background-color
--vaadin-grid-row-hover-background-color
--vaadin-grid-row-odd-background-color
--vaadin-grid-row-selected-background-color

See Styling Components documentation.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract var accessibleName: String

String used to label the grid to screen reader users.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var activeItem: JsAny

The item user has last interacted with. Turns to null after user deactivates the item by re-interacting with the currently active item.

Link copied to clipboard
abstract var allRowsVisible: Boolean

If true, the grid's height is defined by its rows.

Link copied to clipboard
open var ariaActiveDescendantElement: Element?
Link copied to clipboard
open var ariaAtomic: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var ariaBusy: String?
Link copied to clipboard
open var ariaChecked: String?
Link copied to clipboard
open var ariaColCount: String?
Link copied to clipboard
open var ariaColIndex: String?
Link copied to clipboard
Link copied to clipboard
open var ariaColSpan: String?
Link copied to clipboard
open var ariaControlsElements: ReadonlyArray<Element>?
Link copied to clipboard
open var ariaCurrent: String?
Link copied to clipboard
open var ariaDescribedByElements: ReadonlyArray<Element>?
Link copied to clipboard
Link copied to clipboard
open var ariaDetailsElements: ReadonlyArray<Element>?
Link copied to clipboard
open var ariaDisabled: String?
Link copied to clipboard
open var ariaErrorMessageElements: ReadonlyArray<Element>?
Link copied to clipboard
open var ariaExpanded: String?
Link copied to clipboard
open var ariaFlowToElements: ReadonlyArray<Element>?
Link copied to clipboard
open var ariaHasPopup: String?
Link copied to clipboard
open var ariaHidden: String?
Link copied to clipboard
open var ariaInvalid: String?
Link copied to clipboard
Link copied to clipboard
open var ariaLabel: String?
Link copied to clipboard
open var ariaLabelledByElements: ReadonlyArray<Element>?
Link copied to clipboard
open var ariaLevel: String?
Link copied to clipboard
open var ariaLive: String?
Link copied to clipboard
open var ariaModal: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var ariaOwnsElements: ReadonlyArray<Element>?
Link copied to clipboard
Link copied to clipboard
open var ariaPosInSet: String?
Link copied to clipboard
open var ariaPressed: String?
Link copied to clipboard
open var ariaReadOnly: String?
Link copied to clipboard
open var ariaRelevant: String?
Link copied to clipboard
open var ariaRequired: String?
Link copied to clipboard
Link copied to clipboard
open var ariaRowCount: String?
Link copied to clipboard
open var ariaRowIndex: String?
Link copied to clipboard
Link copied to clipboard
open var ariaRowSpan: String?
Link copied to clipboard
open var ariaSelected: String?
Link copied to clipboard
open var ariaSetSize: String?
Link copied to clipboard
open var ariaSort: String?
Link copied to clipboard
open var ariaValueMax: String?
Link copied to clipboard
open var ariaValueMin: String?
Link copied to clipboard
open var ariaValueNow: String?
Link copied to clipboard
Link copied to clipboard
open val assignedSlot: HTMLSlotElement?
Link copied to clipboard
val attributes: NamedNodeMap
Link copied to clipboard
open val attributeStyleMap: StylePropertyMap
Link copied to clipboard
var autocapitalize: AutoCapitalize
Link copied to clipboard
Link copied to clipboard
open var autofocus: Boolean
Link copied to clipboard
Link copied to clipboard

A function that allows generating CSS part names for grid cells in Shadow DOM based on their row and column, for styling from outside using the ::part() selector.

Link copied to clipboard
Link copied to clipboard
val childNodes: NodeList<ChildNode>
Link copied to clipboard
open val children: HTMLCollection<*>
Link copied to clipboard
val classList: DOMTokenList<ClassName>
Link copied to clipboard
var className: ClassName
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var columnRendering: String

Allows you to choose between modes for rendering columns in the grid:

Link copied to clipboard

Set to true to allow column reordering.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val customElementRegistry: CustomElementRegistry?
Link copied to clipboard

Function that provides items lazily. Receives arguments params, callback

Link copied to clipboard
open val dataset: DOMStringMap
Link copied to clipboard
var dataTestId: DataTestId?
Link copied to clipboard

An array containing references to items with open row details.

Link copied to clipboard
var dir: String
Link copied to clipboard
abstract var disabled: Boolean

If true, the user cannot interact with this element.

Link copied to clipboard

A function that filters dragging of specific grid rows. The return value should be false if dragging of the row should be disabled.

Link copied to clipboard
Link copied to clipboard

A function that filters dropping on specific grid rows. The return value should be false if dropping on the row should be disabled.

Link copied to clipboard
abstract var dropMode: String

Defines the locations within the Grid row where an element can be dropped.

Link copied to clipboard
var editContext: EditContext?
Link copied to clipboard
open var enterKeyHint: EnterKeyHint
Link copied to clipboard
abstract var expandedItems: Array<JsAny>

An array that contains the expanded items.

Link copied to clipboard
val firstChild: ChildNode?
Link copied to clipboard
open val firstElementChild: Element?
Link copied to clipboard
var hidden: Hidden
Link copied to clipboard
abstract var i18n: JsAny

The object used to localize this component. To change the default localization, replace this with an object that provides all properties, or just the individual properties you want to change.

Link copied to clipboard
var id: ElementId
Link copied to clipboard
Link copied to clipboard
var innerHTML: HtmlSource
Link copied to clipboard
Link copied to clipboard
open var inputMode: InputMode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var isItemSelectable: (JsAny) -> Boolean

A function to check whether a specific item in the grid may be selected or deselected by the user. Used by the selection column to conditionally enable to disable checkboxes for individual items. This function does not prevent programmatic selection/deselection of items. Changing the function does not modify the currently selected items.

Link copied to clipboard

Path to an item sub-property that indicates whether the item has child items.

Link copied to clipboard
abstract var itemIdPath: String

Path to an item sub-property that identifies the item.

Link copied to clipboard
abstract var items: Array<JsAny>?

An array containing the items which will be passed to renderer functions.

Link copied to clipboard
Link copied to clipboard
val lastChild: ChildNode?
Link copied to clipboard
open val lastElementChild: Element?
Link copied to clipboard
abstract val loading: Boolean

true while data is being requested from the data provider.

Link copied to clipboard
Link copied to clipboard
abstract var multiSort: Boolean

When true, all <vaadin-grid-sorter> are applied for sorting.

Link copied to clipboard

When true, Shift-clicking an unsorted column's sorter adds it to the multi-sort. Shift + Space does the same action via keyboard. This property has precedence over the multiSort property. If multiSortOnShiftClick is true, the multiSort property is effectively ignored.

Link copied to clipboard

Controls how columns are added to the sort order when using multi-sort. The sort order is visually indicated by numbers in grid sorters placed in column headers.

Link copied to clipboard
Link copied to clipboard
open val nextElementSibling: Element?
Link copied to clipboard
val nextSibling: ChildNode?
Link copied to clipboard
Link copied to clipboard
val nodeType: NodeType
Link copied to clipboard
Link copied to clipboard
open var nonce: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val offsetParent: Element?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var onabort: EventHandler<UIEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onanimationcancel: EventHandler<AnimationEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onanimationend: EventHandler<AnimationEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onanimationiteration: EventHandler<AnimationEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onanimationstart: EventHandler<AnimationEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onauxclick: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onbeforeinput: EventHandler<InputEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onbeforematch: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onbeforetoggle: EventHandler<ToggleEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onblur: EventHandler<FocusEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncancel: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncanplay: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncanplaythrough: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onchange: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onclick: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onclose: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncommand: EventHandler<CommandEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncontextlost: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncontextmenu: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var oncontextrestored: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncopy: EventHandler<ClipboardEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var oncuechange: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var oncut: EventHandler<ClipboardEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondblclick: EventHandler<MouseEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondrag: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondragend: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondragenter: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondragleave: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondragover: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondragstart: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondrop: EventHandler<DragEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ondurationchange: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onemptied: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onended: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onerror: JsFunction<*, *>?
Link copied to clipboard
open var onfocus: EventHandler<FocusEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onformdata: EventHandler<FormDataEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
var onfullscreenchange: EventHandler<Event, Element, Node>?
Link copied to clipboard
var onfullscreenerror: EventHandler<Event, Element, Node>?
Link copied to clipboard
open var ongotpointercapture: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var oninput: EventHandler<InputEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var oninvalid: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onkeydown: EventHandler<KeyboardEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onkeyup: EventHandler<KeyboardEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onload: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onloadeddata: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onloadedmetadata: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onloadstart: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onlostpointercapture: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onmousedown: EventHandler<MouseEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onmouseenter: EventHandler<MouseEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onmouseleave: EventHandler<MouseEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onmousemove: EventHandler<MouseEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onmouseout: EventHandler<MouseEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onmouseover: EventHandler<MouseEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onmouseup: EventHandler<MouseEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpaste: EventHandler<ClipboardEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpause: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onplay: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onplaying: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onpointercancel: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpointerdown: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpointerenter: EventHandler<PointerEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onpointerleave: EventHandler<PointerEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onpointermove: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpointerout: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpointerover: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpointerrawupdate: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onpointerup: EventHandler<PointerEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onprogress: EventHandler<ProgressEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onratechange: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onreset: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onresize: EventHandler<UIEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onscroll: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onscrollend: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onsecuritypolicyviolation: EventHandler<SecurityPolicyViolationEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onseeked: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onseeking: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onselect: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onselectionchange: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onselectstart: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onslotchange: EventHandler<Event, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onstalled: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onsubmit: EventHandler<SubmitEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onsuspend: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var ontimeupdate: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var ontoggle: EventHandler<ToggleEvent, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var ontouchcancel: EventHandler<TouchEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontouchend: EventHandler<TouchEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontouchmove: EventHandler<TouchEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontouchstart: EventHandler<TouchEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontransitioncancel: EventHandler<TransitionEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontransitionend: EventHandler<TransitionEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontransitionrun: EventHandler<TransitionEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var ontransitionstart: EventHandler<TransitionEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
open var onvolumechange: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onwaiting: EventHandler<Event, GlobalEventHandlers, GlobalEventHandlers>?
Link copied to clipboard
open var onwheel: EventHandler<WheelEvent, GlobalEventHandlers, Node>?
Link copied to clipboard
var outerHTML: HtmlSource
Link copied to clipboard
Link copied to clipboard
open override val ownerDocument: Document
Link copied to clipboard
abstract var pageSize: Double

Number of items fetched at a time from the dataprovider.

Link copied to clipboard
val parentElement: HTMLElement?
Link copied to clipboard
val parentNode: ParentNode?
Link copied to clipboard
val part: DOMTokenList<JsString>
Link copied to clipboard
var popover: Popover?
Link copied to clipboard
Link copied to clipboard
open val previousElementSibling: Element?
Link copied to clipboard
val previousSibling: ChildNode?
Link copied to clipboard
open var role: String?
Link copied to clipboard

Custom function for rendering the content of the row details. Receives three arguments:

Link copied to clipboard
abstract var rowsDraggable: Boolean

Marks the grid's rows to be available for dragging.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var selectedItems: Array<JsAny>

An array that contains the selected items.

Link copied to clipboard
val shadowRoot: ShadowRoot?
Link copied to clipboard
abstract var size: Double

The number of root-level items in the grid.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val style: CSSStyleDeclaration
Link copied to clipboard
open var tabIndex: Int
Link copied to clipboard
Link copied to clipboard
open override var textContent: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun after(vararg nodes: String)
open fun after(vararg nodes: Node)
Link copied to clipboard
open fun animate(keyframes: ReadonlyArray<Keyframe>?, options: Double): Animation
open fun animate(keyframes: ReadonlyArray<Keyframe>?, options: KeyframeAnimationOptions): Animation
open fun animate(keyframes: PropertyIndexedKeyframes?, options: Double): Animation
open fun animate(keyframes: PropertyIndexedKeyframes?, options: KeyframeAnimationOptions): Animation
Link copied to clipboard
open fun append(vararg nodes: String)
open fun append(vararg nodes: Node)
Link copied to clipboard
fun <T : Node> appendChild(node: T): T
Link copied to clipboard
fun attachInternals(): ElementInternals
Link copied to clipboard
fun attachShadow(init: ShadowRootInit): ShadowRoot
Link copied to clipboard
open fun before(vararg nodes: String)
open fun before(vararg nodes: Node)
Link copied to clipboard
open fun blur()
Link copied to clipboard
fun checkVisibility(options: CheckVisibilityOptions): Boolean
Link copied to clipboard
abstract fun clearCache()

Clears the cached pages and reloads data from dataprovider when needed.

Link copied to clipboard
fun click()
Link copied to clipboard
fun cloneNode(subtree: Boolean): Node
Link copied to clipboard
abstract fun closeItemDetails(item: JsAny)

Close the details row of a given item.

Link copied to clipboard
fun closest(selector: String): Element?
fun <T : Element> closest(selector: TagName<T>): T?
Link copied to clipboard
abstract fun collapseItem(item: JsAny)

Collapses the given item tree.

Link copied to clipboard
fun compareDocumentPosition(other: Node): NodePosition
Link copied to clipboard
fun computedStyleMap(): StylePropertyMapReadOnly
Link copied to clipboard
fun contains(other: Node?): Boolean
Link copied to clipboard
abstract fun deselectItem(item: JsAny)

Deselects the given item if it is already selected.

Link copied to clipboard
open fun dispatchEvent(event: Event): Boolean
Link copied to clipboard
abstract fun expandItem(item: JsAny)

Expands the given item tree.

Link copied to clipboard
abstract fun filterDragAndDrop()

Runs the dragFilter and dropFilter hooks for the visible cells. If the filter depends on varying conditions, you may need to call this function manually in order to update the draggability when the conditions change.

Link copied to clipboard
open fun focus(options: FocusOptions)
Link copied to clipboard
abstract fun generateCellPartNames()

Runs the cellPartNameGenerator for the visible cells. If the generator depends on varying conditions, you need to call this function manually in order to update the styles when the conditions change.

Link copied to clipboard
open fun getAnimations(options: GetAnimationsOptions): ReadonlyArray<Animation>
Link copied to clipboard
fun getAttribute(qualifiedName: String): String?
Link copied to clipboard
fun getAttributeNames(): ReadonlyArray<JsString>
Link copied to clipboard
fun getAttributeNode(qualifiedName: String): Attr?
Link copied to clipboard
fun getAttributeNodeNS(namespace: String?, localName: String): Attr?
Link copied to clipboard
fun getAttributeNS(namespace: String?, localName: String): String?
Link copied to clipboard
fun getBoundingClientRect(): DOMRect
Link copied to clipboard
fun getClientRects(): DOMRectList
Link copied to clipboard
fun getElementsByClassName(classNames: ClassName): HTMLCollection<Element>
Link copied to clipboard
fun getElementsByTagName(qualifiedName: String): HTMLCollection<Element>
fun <T : Element> getElementsByTagName(qualifiedName: TagName<T>): HTMLCollection<T>
Link copied to clipboard
fun getElementsByTagNameNS(namespace: String?, localName: String): HTMLCollection<Element>
fun <T : Element> getElementsByTagNameNS(namespaceURI: TagNamespace<T>, localName: TagName<T>): HTMLCollection<T>
Link copied to clipboard
abstract fun getEventContext(event: Event): GridEventContext

Returns an object with context information about the event target:

Link copied to clipboard
fun getHTML(options: GetHTMLOptions): String
Link copied to clipboard
abstract fun getItemId(item: JsAny): JsAny

Returns a value that identifies the item. Uses itemIdPath if available. Can be customized by overriding.

Link copied to clipboard
fun getRootNode(options: GetRootNodeOptions): Node
Link copied to clipboard
fun hasAttribute(qualifiedName: String): Boolean
Link copied to clipboard
fun hasAttributeNS(namespace: String?, localName: String): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun hasPointerCapture(pointerId: Int): Boolean
Link copied to clipboard
Link copied to clipboard
fun insertAdjacentElement(where: InsertPosition, element: Element): Element?
Link copied to clipboard
fun insertAdjacentHTML(position: InsertPosition, string: String)
fun insertAdjacentHTML(position: InsertPosition, string: TrustedHTML)
Link copied to clipboard
fun insertAdjacentText(where: InsertPosition, data: String)
Link copied to clipboard
fun <T : Node> insertBefore(node: T, child: Node?): T
Link copied to clipboard
Link copied to clipboard
fun isEqualNode(otherNode: Node?): Boolean
Link copied to clipboard
fun isSameNode(otherNode: Node?): Boolean
Link copied to clipboard
Link copied to clipboard
fun lookupPrefix(namespace: String?): String?
Link copied to clipboard
fun matches(selectors: String): Boolean
Link copied to clipboard
open fun moveBefore(node: Node, child: Node?)
Link copied to clipboard
fun normalize()
Link copied to clipboard
abstract fun openItemDetails(item: JsAny)

Open the details row of a given item.

Link copied to clipboard
open fun prepend(vararg nodes: String)
open fun prepend(vararg nodes: Node)
Link copied to clipboard
open fun querySelector(selectors: String): Element?
open fun <T : Element> querySelector(selectors: TagName<T>): T?
Link copied to clipboard
open fun querySelectorAll(selectors: String): NodeList<Element>
open fun <T : Element> querySelectorAll(selectors: TagName<T>): NodeList<T>
Link copied to clipboard

Updates the width of all columns which have autoWidth set to true.

Link copied to clipboard
fun releasePointerCapture(pointerId: Int)
Link copied to clipboard
open fun remove()
Link copied to clipboard
fun removeAttribute(qualifiedName: String)
Link copied to clipboard
fun removeAttributeNode(attr: Attr): Attr
Link copied to clipboard
fun removeAttributeNS(namespace: String?, localName: String)
Link copied to clipboard
fun <T : Node> removeChild(child: T): T
Link copied to clipboard
fun <T : Node> replaceChild(node: Node, child: T): T
Link copied to clipboard
open fun replaceChildren()
open fun replaceChildren(vararg nodes: String)
open fun replaceChildren(vararg nodes: Node)
Link copied to clipboard
open fun replaceWith(vararg nodes: String)
open fun replaceWith(vararg nodes: Node)
Link copied to clipboard
abstract fun requestContentUpdate()

Requests an update for the content of cells.

Link copied to clipboard
fun requestFullscreenAsync(options: FullscreenOptions): Promise<Void>
Link copied to clipboard
fun requestPointerLockAsync(options: PointerLockOptions): Promise<Void>
Link copied to clipboard
fun scroll(options: ScrollToOptions): Promise<Void>?
fun scroll(x: Double, y: Double): Promise<Void>?
Link copied to clipboard
fun scrollBy(options: ScrollToOptions): Promise<Void>?
fun scrollBy(x: Double, y: Double): Promise<Void>?
Link copied to clipboard
fun scrollIntoView(options: ScrollIntoViewOptions): Promise<Void>?
Link copied to clipboard
fun scrollTo(options: ScrollToOptions): Promise<Void>?
fun scrollTo(x: Double, y: Double): Promise<Void>?
Link copied to clipboard
abstract fun scrollToColumn(indexOrColumn: GridColumnElementOrDouble)

Scrolls horizontally so that the column becomes visible in the viewport.

Link copied to clipboard
abstract fun scrollToIndex(vararg indexes: Double)

Scroll to a specific row index in the virtual list. Note that the row index is not always the same for any particular item. For example, sorting or filtering items can affect the row index related to an item.

Link copied to clipboard
abstract fun selectItem(item: JsAny)

Selects the given item.

Link copied to clipboard
fun setAttribute(qualifiedName: String, value: String)
Link copied to clipboard
fun setAttributeNode(attr: Attr): Attr?
Link copied to clipboard
fun setAttributeNodeNS(attr: Attr): Attr?
Link copied to clipboard
fun setAttributeNS(namespace: String?, qualifiedName: String, value: String)
Link copied to clipboard
abstract fun setDefaultMultiSortPriority(priority: String)

Sets the default multi-sort priority to use for all grid instances. This method should be called before creating any grid instances. Changing this setting does not affect the default for existing grids.

Link copied to clipboard
fun setHTML(html: String, options: SetHTMLOptions)
Link copied to clipboard
fun setHTMLUnsafe(html: String, options: SetHTMLUnsafeOptions)
fun setHTMLUnsafe(html: TrustedHTML, options: SetHTMLUnsafeOptions)
Link copied to clipboard
fun setPointerCapture(pointerId: Int)
Link copied to clipboard
fun showPopover(options: ShowPopoverOptions)
Link copied to clipboard
fun toggleAttribute(qualifiedName: String, force: Boolean): Boolean
Link copied to clipboard
fun togglePopover(options: TogglePopoverOptions): Boolean
Link copied to clipboard
fun <T : Event> when(type: EventType<T>, options: ObservableEventListenerOptions?): Observable<T>