Properties

Link copied to clipboard
abstract var accessibleName: String

String used to label the grid to screen reader users.

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

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
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

Function that provides items lazily. Receives arguments params, callback

Link copied to clipboard

An array containing references to items with open row details.

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

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
abstract var expandedItems: Array<JsAny>

An array that contains the expanded items.

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
abstract val loading: Boolean

true while data is being requested from the data provider.

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
abstract var pageSize: Double

Number of items fetched at a time from the dataprovider.

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
abstract var selectedItems: Array<JsAny>

An array that contains the selected items.

Link copied to clipboard
abstract var size: Double

The number of root-level items in the grid.

Functions

Link copied to clipboard
abstract fun clearCache()

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

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

Close the details row of a given item.

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

Collapses the given item tree.

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

Deselects the given item if it is already selected.

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
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
abstract fun getEventContext(event: Event): GridEventContext

Returns an object with context information about the event target:

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
abstract fun openItemDetails(item: JsAny)

Open the details row of a given item.

Link copied to clipboard

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

Link copied to clipboard
abstract fun requestContentUpdate()

Requests an update for the content of cells.

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
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.