@microsoft/fast-foundation > DataGrid

DataGrid class

A Data Grid Custom HTML Element.

  • The default slot for custom row elements

Signature:

export declare class DataGrid extends FoundationElement 

Constructors

Constructor Modifiers Description
(constructor)() Constructs a new instance of the DataGrid class

Properties

Property Modifiers Type Description
cellItemTemplate ViewTemplate The template used to render cells in generated rows.
columnDefinitions ColumnDefinition[] | null The column definitions of the grid
focusColumnIndex number The 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.
focusRowIndex number The 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.
generateColumns static (row: object) => ColumnDefinition[] generates a basic column definition by examining sample row data
generateHeader GenerateHeaderOptions Whether the grid should automatically generate a header row and its type
gridTemplateColumns string String that gets applied to the the css gridTemplateColumns attribute of child rows
headerCellItemTemplate ViewTemplate The template used to render header cells in generated rows.
noTabbing boolean When true the component will not add itself to the tab queue. Default is false.
rowElementTag string Set by the component templates.
rowItemTemplate ViewTemplate The template to use for the programmatic generation of rows
rowsData object[] The data being displayed in the grid