Skip to content

VDataGrid

Props

NameTypeDescription
cell-item-template@microsoft/fast-element#ViewTemplate<any, any>The template used to render cells in generated rows.
column-definitionsEnum:
{columnDataKey: string; gridColumn?: string; title?: string; headerCellTemplate?: @microsoft/fast-element#ViewTemplate<any, any>; headerCellInternalFocusQueue?: false
true; headerCellFocusTargetCallback?: ((cell: @vonage/vivid#VwcDataGridCellElement) => HTMLElement); cellTemplate?: @microsoft/fast-element#ViewTemplate<any, any>; cellInternalFocusQueue?: false | true; cellFocusTargetCallback?: ((cell: @vonage/vivid#VwcDataGridCellElement) => HTMLElement); isRowHeader?: false | true}[]
The column definitions of the grid
fixed-columnsnumberNumber of columns to be fixed when scrolling horizontally
focus-column-indexnumberThe index of the column that will receive focus the next time the grid is focused. This value changes as focus moves to different rows within the grid. Changing this value when focus is already within the grid moves focus to the specified column.
focus-row-indexnumberThe index of the row that will receive focus the next time the grid is focused. This value changes as focus moves to different rows within the grid. Changing this value when focus is already within the grid moves focus to the specified row.
generate-headerEnum:
none
default
sticky
Whether the grid should automatically generate a header row and its type
grid-template-columnsstringString that gets applied to the css gridTemplateColumns attribute of child rows
header-cell-item-template@microsoft/fast-element#ViewTemplate<any, any>The template used to render header cells in generated rows.
no-tabbingbooleanWhen true the component will not add itself to the tab queue. Default is false.
row-element-tagstringSet by the component templates.
row-item-template@microsoft/fast-element#ViewTemplate<any, any>The template to use for the programmatic generation of rows
rows-dataobject[]The data being displayed in the grid
selection-modeEnum:
none
single-row
multi-row
single-cell
multi-cell
Indicates the selection mode.

Events

NameEvent TypeDescription
blurFocusEventFires when the element loses focus.
cell-clickCustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>Event that fires when a cell is clicked
clickMouseEventFires when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element.
focusFocusEventFires when the element receives focus.
inputEventFires when the value of an element has been changed.
keydownKeyboardEventFires when a key is pressed.
keyupKeyboardEventFires when a key is released.

Slots

NameDescription
defaultDefault slot.

Methods

NameTypeDescription
selectionModeChanged`(oldValue: 'none''single-row'