Data Grid

Overview

Data grids are used to organize and display data efficiently. The data grid component allows for customization with additional functionality, as needed by users.

When to use:

  • To organize and display data.
  • If your user must navigate to a specific piece of data to complete a task.
  • Displaying all of a user’s resources.

Demo

Props

PropertyDescriptionTypeValuesDefaultRequired
columnsThe table columnsColumnDefinition[]ColumnDefinition[]
rowDataThe data for the rows Can either be an array of data or a string pointing to an endpointstring | T[]string | T[]
filterProvide a filter for the rowDatastring | undefinedstring | undefined
filterFieldsA list of fields to filter bystring[] | undefinedstring[] | undefined
paginationTurn on pagination for the gridnumber | true | undefinednumber | true | undefined0
paginationSizeSelectorThe values for the pagination size selectortrue | any[] | number[] | undefinedtrue | any[] | number[] | undefined
showPaginationCounterShows the total count of itemsboolean | undefinedboolean | undefinedfalse
itemsNameThe text for the pagination counter and pagination size selectorstring | undefinedstring | undefined"items"
paginationButtonCountThe number of page button to shownumber | undefinednumber | undefined5
heightThe height for the gridstring | number | false | undefinedstring | number | false | undefined
columnLayoutSet the column layout mode"fitData" | "fitColumns" | "fitDataFill" | "fitDataStretch" | "fitDataTable" | undefined"fitData" | "fitColumns" | "fitDataFill" | "fitDataStretch" | "fitDataTable" | undefined"fitDataStretch"
downloadButtonEnable the download button within the componentstring | undefinedstring | undefined
fileNameSet the file name for the downloadstring | undefinedstring | undefined"data"
antiforgeryTokenOptional anti-forgery token for secure requestsstring | undefinedstring | undefined
useRemoteFilteringEnables remote filtering via ajaxboolean | undefinedboolean | undefinedfalse
useRemotePagingEnables remote paging via ajaxboolean | undefinedboolean | undefinedfalse
useRemoteSortingEnables remote sorting via ajaxboolean | undefinedboolean | undefinedfalse
enableColumnCalcsEnables column calculationsboolean | undefinedboolean | undefinedfalse
debugEnables verbose console logging for troubleshootingboolean | undefinedboolean | undefinedfalse

Events

NameReturn Type
rowClick[UIEvent, RowComponent]
downloadTriggeredvoid
data-loaded[number]
data-error[string]
count-change[number]