New to KendoReactStart a free 30-day trial

GridProps

Represents the props of the KendoReact Grid component.

NameTypeDefaultDescription

ariaLabel?

string

Deprecated. The accessible label of the Grid. Use (messages) instead.

cellRender?

(defaultRendering: "null" | ReactElement<HTMLTableCellElement>, props: GridCellProps) => "null" | ReactElement<HTMLTableCellElement> | ReactElement<HTMLTableCellElement>[]

Fires when a cell is about to be rendered. Used to override the default appearance of the cell (see example).

cells?

GridCellsSettings

Sets a set of custom components that the Grid will render instead of the built-in cell.

children?

React.ReactNode

Determines the children nodes.

className?

string

Sets a class of the Grid DOM element.

clipboard?

boolean | ClipboardSettings

When set enables the clipboard copy, cut and paste manipulations. It takes values of type ClipboardSettings or boolean.

columnMenu?

"null" | ComponentType<GridColumnMenuProps>

Specifies a React element that will be cloned and rendered inside the column menu of the Grid. Can be overridden on column level.

columnMenuIcon?

SVGIcon

Globally overrides the default(three vertical dots) column menu icon for the whole Grid. If set, the prop can be overridden on column level using the (menuIcon) property.

columnVirtualization?

boolean

Enables virtualization of the columns. If virtualization is enabled, the columns outside the view are not rendered.

data?

"null" | any[] | DataResult

Sets the data of the Grid (see example). If you use paging, the data option has to contain only the items for the current page. It takes values of type null, any or DataResult

dataItemKey?

string

Sets the Grid row key prop to the value of this field in the dataItem. If not set, the dataItem index will be used for the row key, which might lead to row not updated during paging or scrolling.

detail?

"null" | ComponentType<GridDetailRowProps>

Specifies a React element that will be cloned and rendered inside the detail rows of the currently expanded items (see example). An item will be rendered as expanded if the value of its expandField is true.

detailRowHeight?

number

Defines the detail row height and forces an equal height to all detail rows.

editField?

string

Specifies the name of the field which will provide a Boolean representation of the edit state of the current item (more information and examples).

expandField?

string

Specifies the name of the field which will provide a Boolean representation of the expanded state of the item (see example).

filter?

CompositeFilterDescriptor

The descriptor by which the data is filtered (more information and examples). This affects the values and buttons in the FilterRow of the Grid.

filterable?

boolean

Enables the filtering of the columns with their field option set (more information and examples).

filterCellRender?

(defaultRendering: "null" | ReactElement<any>, props: GridFilterCellProps) => "null" | ReactElement<any>

Fires when a filter cell is about to be rendered. Overrides the default appearance of the filter cell.

filterOperators?

GridFilterOperators

The filter operators for the Grid filters.

fixedScroll?

boolean

Determines if the scroll position will be updated after data change. If set to true the scroll will remain on the same position.

group?

GroupDescriptor[]

The descriptors[] by which the data will be grouped (more information and examples).

groupable?

boolean | GridGroupableSettings

Determines if grouping by dragging and dropping the column headers is allowed (more information and examples).

headerCellRender?

(defaultRendering: ReactNode, props: GridHeaderCellProps) => ReactNode

Fires when a header cell is about to be rendered. Overrides the default appearance of the header cell.

id?

string

Sets the id property of the top div element of the component.

lockGroups?

boolean

Defines if the group descriptor columns are locked (frozen or sticky). Locked columns are the columns that are visible at all times while the user scrolls the component horizontally. Defaults to false.

boolean | NavigatableSettings

If set to true, the user can use dedicated shortcuts to interact with the Grid. By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.

onClipboard?

(event: ClipboardDataEvent) => void

Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type ClipboardDataEvent.

onColumnReorder?

(event: GridColumnReorderEvent) => void

Fires when the columns are reordered.

onColumnResize?

(event: GridColumnResizeEvent) => void

Fires when a column is resized.

onContextMenu?

(event: GridContextMenuEvent) => void

The event that is fired when the ContextMenu is activated.

onDataStateChange?

(event: GridDataStateChangeEvent) => void

Fires when the data state of the Grid is changed (more information and example).

onExpandChange?

(event: GridExpandChangeEvent) => void

Fires when the user tries to expand or collapse a row.

onFilterChange?

(event: GridFilterChangeEvent) => void

Fires when the Grid filter is modified through the UI (more information and examples). You have to handle the event yourself and filter the data.

onGroupChange?

(event: GridGroupChangeEvent) => void

Fires when the grouping of the Grid is changed. You have to handle the event yourself and group the data (more information and examples).

onHeaderSelectionChange?

(event: GridHeaderSelectionChangeEvent) => void

Fires when the user clicks the checkbox of a column header whose field matches selectedField (more information and example).

onItemChange?

(event: GridItemChangeEvent) => void

Fires when the user changes the values of the item. The event is not debounced and fires on every onChange event of the input in the current EditCell (more information and examples).

onKeyDown?

(event: GridKeyDownEvent) => void

Fires when the user press keyboard key.

onNavigationAction?

(event: GridNavigationActionEvent) => void

Fires when Grid keyboard navigation position is changed.

onPageChange?

(event: GridPageChangeEvent) => void

Fires when the page of the Grid is changed (see example). You have to handle the event yourself and page the data.

onRowClick?

(event: GridRowClickEvent) => void

Fires when the user clicks a row.

onRowDoubleClick?

(event: GridRowDoubleClickEvent) => void

Fires when the user double clicks a row.

onScroll?

(event: GridEvent) => void

Fires when Grid is scrolled.

onSelectionChange?

(event: GridSelectionChangeEvent) => void

Fires when the user tries to select or deselect a row or cell.

onSortChange?

(event: GridSortChangeEvent) => void

Fires when the sorting of the Grid is changed (see example). You have to handle the event yourself and sort the data.

pageable?

boolean | GridPagerSettings

Configures the pager of the Grid (see example).

The available options are:

  • buttonCount: Number—Sets the maximum numeric buttons count before the buttons are collapsed.
  • info: Boolean—Toggles the information about the current page and the total number of records.
  • type: PagerType—Accepts the numeric (buttons with numbers) and input (input for typing the page number) values.
  • pageSizes: Boolean or Array<number>—Shows a menu for selecting the page size.
  • previousNext: Boolean—Toggles the Previous and Next buttons.
  • navigatable: Boolean—Defines if the pager will be navigatable.

pager?

"null" | ComponentType<PagerProps>

The pager component that the Grid will render instead of the built-in pager. It takes values of type null and ComponentType<PagerProps&gt

pageSize?

number

Defines the page size that is used by the Grid pager (see example). Required by the paging functionality.

reorderable?

boolean

If set to true, the user can reorder columns by dragging their header cells (see example).

resizable?

boolean

If set to true, the user can resize columns by dragging the edges (resize handles) of their header cells (see example).

rowHeight?

number

Defines the row height and forces an equal height to all rows (see example).

rowRender?

(row: ReactElement<HTMLTableRowElement>, props: GridRowProps) => ReactNode

Fires when a row is about to be rendered. Overrides the default appearance of the row.

scrollable?

ScrollMode

Defines the scroll mode that is used by the Grid (see example).

The available options are:

  • none—Renders no scrollbar.
  • scrollable—This is the default scroll mode. It requires the setting of the height option.
  • virtual—Displays no pager and renders a portion of the data (optimized rendering) while the user is scrolling the content.

selectable?

GridSelectableSettings

The Grid selectable settings.

selectedField?

string

Specifies the name of the field which will provide a:

  • Boolean representation of the selected state of the item (see example) for row selection
  • String array of the selected columns of the item for cell selection

size?

"small" | "medium"

medium

Configures the size of the Grid.

The available options are:

  • small
  • medium

skip?

number

Defines the number of records that will be skipped by the pager (see example). Required by the paging functionality.

sort?

SortDescriptor[]

The (descriptors) by which the data is sorted. Applies the sorting styles and buttons to the affected columns.

sortable?

SortSettings

Enables the sorting for the columns with their field option set (see example).

style?

React.CSSProperties

Represents the style HTML attribute.

take?

number

Alias of pageSize property. If take is set, pageSize will be ignored.

total?

number

Defines the total number of data items in all pages (see example). Required by the paging functionality.

Not finding the help you need?
Contact Support