The api of Data Grid Pro.

interface GridPrivateApiPro {
    applySorting: (() => void);
    applyStrategyProcessor: (<P>(processorName: P, params: GridStrategyProcessingLookup[P]["params"]) => GridStrategyProcessingLookup[P]["value"]);
    autosizeColumns: ((options?: GridAutosizeOptions) => Promise<void>);
    caches: GridApiCaches;
    calculateColSpan: ((options: {
        columns: GridStateColDef[];
        maxLastColumn: number;
        minFirstColumn: number;
        rowId: GridRowId;
    }) => void);
    columnHeadersContainerRef: RefObject<null | HTMLDivElement>;
    deleteFilterItem: ((item: GridFilterItem) => void);
    detailPanelHasAutoHeight: ((id: GridRowId) => boolean);
    eventManager: EventManager;
    exportDataAsCsv: ((options?: GridCsvExportOptions) => void);
    exportDataAsPrint: ((options?: GridPrintExportOptions) => void);
    exportState: ((params?: GridExportStateParams) => GridInitialStatePro);
    fetchRowChildren: ((id: GridRowId) => void);
    forceUpdate: (() => void);
    getActiveStrategy: ((strategyGroup: "rowTree") => string);
    getAllColumns: (() => GridStateColDef[]);
    getAllGroupDetails: (() => GridColumnGroupLookup);
    getAllRowIds: (() => GridRowId[]);
    getCellElement: ((id: GridRowId, field: string) => null | HTMLDivElement);
    getCellMode: ((id: GridRowId, field: string) => GridCellMode);
    getCellParams: (<R, V, F, N>(id: GridRowId, field: string) => GridCellParams<R, V, F, N>);
    getCellParamsForRow: (<R, V, F, N>(id: GridRowId, field: string, row: R, cellParams: {
        cellMode: GridCellMode;
        colDef: GridStateColDef;
        hasFocus: boolean;
        rowNode: N;
        tabIndex: -1 | 0;
    }) => GridCellParams<R, V, F, N>);
    getCellValue: (<V>(id: GridRowId, field: string) => V);
    getColumn: ((field: string) => GridStateColDef);
    getColumnGroupHeaderFocus: (() => null | GridColumnGroupIdentifier);
    getColumnGroupPath: ((field: string) => string[]);
    getColumnHeaderElement: ((field: string) => null | HTMLDivElement);
    getColumnHeaderParams: ((field: string) => GridColumnHeaderParams<GridValidRowModel, any, any>);
    getColumnIndex: ((field: string, useVisibleColumns?: boolean) => number);
    getColumnIndexRelativeToVisibleColumns: ((field: string) => number);
    getColumnPosition: ((field: string) => number);
    getDataAsCsv: ((options?: GridCsvExportOptions) => string);
    getExpandedDetailPanels: (() => GridRowId[]);
    getFilterState: ((filterModel: GridFilterModel) => GridFilterState);
    getInfiniteLoadingTriggerElement?: ((__namedParameters: {
        lastRowId: string | number;
    }) => ReactNode);
    getLastMeasuredRowIndex: (() => number);
    getLocaleText: (<T>(key: T) => GridLocaleText[T]);
    getLogger: ((name: string) => Logger);
    getPinnedColumns: (() => GridPinnedColumnFields);
    getPropagatedRowSelectionModel: ((inputSelectionModel: GridRowSelectionModel) => GridRowSelectionModel);
    getPublicApi: (() => GridApiPro);
    getRootDimensions: (() => GridDimensions);
    getRow: (<R>(id: GridRowId) => null | R);
    getRowElement: ((id: GridRowId) => null | HTMLDivElement);
    getRowGroupChildren: ((params: GridRowGroupChildrenGetterParams) => GridRowId[]);
    getRowHeightEntry: ((id: GridRowId) => HeightEntry);
    getRowId: (<R>(row: R) => GridRowId);
    getRowIdFromRowIndex: ((index: number) => GridRowId);
    getRowIndexRelativeToVisibleRows: ((id: GridRowId) => number);
    getRowMode: ((id: GridRowId) => GridRowMode);
    getRowModels: (() => Map<GridRowId, GridValidRowModel>);
    getRowNode: (<N>(id: GridRowId) => null | N);
    getRowParams: ((id: GridRowId) => GridRowParams<any>);
    getRowsCount: (() => number);
    getRowWithUpdatedValues: ((id: GridRowId, field: string) => GridValidRowModel);
    getRowWithUpdatedValuesFromCellEditing: ((id: GridRowId, field: string) => GridValidRowModel);
    getRowWithUpdatedValuesFromRowEditing: ((id: GridRowId) => GridValidRowModel);
    getScrollPosition: (() => GridScrollParams);
    getSelectedRows: (() => Map<GridRowId, GridValidRowModel>);
    getSortedRowIds: (() => GridRowId[]);
    getSortedRows: (() => GridValidRowModel[]);
    getSortModel: (() => GridSortModel);
    getViewportPageSize: (() => number);
    getVisibleColumns: (() => GridStateColDef[]);
    headerFiltersElementRef?: RefObject<null | HTMLDivElement>;
    hideColumnMenu: (() => void);
    hideFilterPanel: (() => void);
    hideHeaderFilterMenu: (() => void);
    hidePreferences: (() => void);
    hydrateRowsMeta: (() => void);
    ignoreDiacritics: boolean;
    isCellEditable: ((params: GridCellParams<any, unknown, unknown, GridTreeNode>) => boolean);
    isColumnPinned: ((field: string) => false | GridPinnedColumnPosition);
    isRowSelectable: ((id: GridRowId) => boolean);
    isRowSelected: ((id: GridRowId) => boolean);
    mainElementRef: RefObject<null | HTMLDivElement>;
    moveFocusToRelativeCell: ((id: GridRowId, field: string, direction: "left" | "right" | "below") => void);
    observeRowHeight: ((element: Element, rowId: GridRowId) => void | Destructor);
    pinColumn: ((field: string, side: GridPinnedColumnPosition) => void);
    publishEvent: GridEventPublisher;
    register: (<V, T>(visibility: V, methods: T) => void);
    registerControlState: (<E>(controlState: GridControlStateItem<GridStatePro, E>) => void);
    registerPipeApplier: ((group: keyof GridPipeProcessingLookup, id: string, applier: (() => void)) => (() => void));
    registerPipeProcessor: (<G>(group: keyof GridPipeProcessingLookup, id: string, processor: GridPipeProcessor<G>) => (() => void));
    registerStrategyProcessor: (<P>(strategyName: string, processorName: P, processor: GridStrategyProcessor<P>) => (() => void));
    requestPipeProcessorsApplication: ((group: keyof GridPipeProcessingLookup) => void);
    resetColSpan: (() => void);
    resetDataSourceState: (() => void);
    resetRowHeights: (() => void);
    resize: (() => void);
    restoreState: ((stateToRestore: GridInitialStatePro) => void);
    rootProps: DataGridProProcessedProps<any>;
    rowHasAutoHeight: ((id: GridRowId) => boolean);
    runPendingEditCellValueMutation: ((id: GridRowId, field?: string) => void);
    scroll: ((params: Partial<GridScrollParams>) => void);
    scrollToIndexes: ((params: Partial<GridCellIndexCoordinates>) => boolean);
    selectRow: ((id: GridRowId, isSelected?: boolean, resetSelection?: boolean) => void);
    selectRowRange: ((range: {
        endId: GridRowId;
        startId: GridRowId;
    }, isSelected?: boolean, resetSelection?: boolean) => void);
    selectRows: ((ids: GridRowId[], isSelected?: boolean, resetSelection?: boolean) => void);
    setCellEditingEditCellValue: ((params: GridEditCellValueParams) => Promise<boolean>);
    setCellFocus: ((id: GridRowId, field: string) => void);
    setColumnGroupHeaderFocus: ((field: string, depth: number, event?: MuiBaseEvent) => void);
    setColumnHeaderFilterFocus: ((field: string, event?: MuiBaseEvent) => void);
    setColumnHeaderFocus: ((field: string, event?: MuiBaseEvent) => void);
    setColumnIndex: ((field: string, targetIndexPosition: number) => void);
    setColumnVisibility: ((field: string, isVisible: boolean) => void);
    setColumnVisibilityModel: ((model: GridColumnVisibilityModel) => void);
    setColumnWidth: ((field: string, width: number) => void);
    setDensity: ((density: GridDensity) => void);
    setEditCellValue: ((params: GridEditCellValueParams, event?: MuiBaseEvent) => void | Promise<boolean>);
    setExpandedDetailPanels: ((ids: GridRowId[]) => void);
    setFilterLogicOperator: ((operator: GridLogicOperator) => void);
    setFilterModel: ((model: GridFilterModel, reason?:
        | "upsertFilterItem"
        | "upsertFilterItems"
        | "deleteFilterItem"
        | "changeLogicOperator"
        | "restoreState"
        | "removeAllFilterItems") => void);
    setLoading: ((loading: boolean) => void);
    setPage: ((page: number) => void);
    setPageSize: ((pageSize: number) => void);
    setPaginationMeta: ((paginationMeta: GridPaginationMeta) => void);
    setPaginationModel: ((model: GridPaginationModel) => void);
    setPinnedColumns: ((pinnedColumns: GridPinnedColumnFields) => void);
    setQuickFilterValues: ((values: any[]) => void);
    setRowChildrenExpansion: ((id: GridRowId, isExpanded: boolean) => void);
    setRowCount: ((rowCount: number) => void);
    setRowEditingEditCellValue: ((params: GridEditCellValueParams) => Promise<boolean>);
    setRowIndex: ((rowId: GridRowId, targetIndex: number) => void);
    setRows: ((rows: GridValidRowModel[]) => void);
    setRowSelectionModel: ((rowSelectionModel: GridRowSelectionModel) => void);
    setSortModel: ((model: GridSortModel) => void);
    setStrategyAvailability: ((strategyGroup: "rowTree", strategyName: string, callback: (() => boolean)) => void);
    showColumnMenu: ((field: string) => void);
    showFilterPanel: ((targetColumnField?: string, panelId?: string, labelId?: string) => void);
    showHeaderFilterMenu: ((field: string) => void);
    showPreferences: ((newValue: GridPreferencePanelsValue, panelId?: string, labelId?: string) => void);
    sortColumn: ((field: string, direction?: GridSortDirection, allowMultipleSorting?: boolean) => void);
    startHeaderFilterEditMode: ((field: string) => void);
    state: GridStatePro;
    stopHeaderFilterEditMode: (() => void);
    storeDetailPanelHeight: ((id: GridRowId, height: number) => void);
    subscribeEvent: (<E>(event: E, handler: GridEventListener<E>, options?: EventListenerOptions) => (() => void));
    toggleColumnMenu: ((field: string) => void);
    toggleDetailPanel: ((id: GridRowId) => void);
    unpinColumn: ((field: string) => void);
    unstable_dataSource: GridDataSourceApiBase;
    unstable_replaceRows: ((firstRowToReplace: number, newRows: GridValidRowModel[]) => void);
    unstable_setColumnVirtualization: ((enabled: boolean) => void);
    unstable_setPinnedRows: ((pinnedRows?: GridPinnedRowsProp<GridValidRowModel>) => void);
    unstable_setVirtualization: ((enabled: boolean) => void);
    updateColumns: ((cols: GridColDef[]) => void);
    updateControlState: (<K>(key: K, state: ((oldState: GridStatePro[K]) => GridStatePro[K]), reason?: GridControlledStateReasonLookup[K]) => boolean);
    updateDimensions: (() => void);
    updateRenderContext?: (() => void);
    updateRows: ((updates: GridRowModelUpdate[]) => void);
    updateServerRows: ((updates: GridRowModelUpdate[], groupKeys?: string[]) => void);
    upsertFilterItem: ((item: GridFilterItem) => void);
    upsertFilterItems: ((items: GridFilterItem[]) => void);
    virtualScrollbarHorizontalRef: RefObject<null | HTMLDivElement>;
    virtualScrollbarVerticalRef: RefObject<null | HTMLDivElement>;
    virtualScrollerRef: RefObject<null | HTMLDivElement>;
    startCellEditMode(params: GridStartCellEditModeParams): void;
    startRowEditMode(params: GridStartRowEditModeParams): void;
    stopCellEditMode(params: GridStopCellEditModeParams): void;
    stopRowEditMode(params: GridStopRowEditModeParams): void;
}

Hierarchy (view full)

Properties

applySorting applyStrategyProcessor autosizeColumns caches calculateColSpan columnHeadersContainerRef deleteFilterItem detailPanelHasAutoHeight eventManager exportDataAsCsv exportDataAsPrint exportState fetchRowChildren forceUpdate getActiveStrategy getAllColumns getAllGroupDetails getAllRowIds getCellElement getCellMode getCellParams getCellParamsForRow getCellValue getColumn getColumnGroupHeaderFocus getColumnGroupPath getColumnHeaderElement getColumnHeaderParams getColumnIndex getColumnIndexRelativeToVisibleColumns getColumnPosition getDataAsCsv getExpandedDetailPanels getFilterState getInfiniteLoadingTriggerElement? getLastMeasuredRowIndex getLocaleText getLogger getPinnedColumns getPropagatedRowSelectionModel getPublicApi getRootDimensions getRow getRowElement getRowGroupChildren getRowHeightEntry getRowId getRowIdFromRowIndex getRowIndexRelativeToVisibleRows getRowMode getRowModels getRowNode getRowParams getRowsCount getRowWithUpdatedValues getRowWithUpdatedValuesFromCellEditing getRowWithUpdatedValuesFromRowEditing getScrollPosition getSelectedRows getSortedRowIds getSortedRows getSortModel getViewportPageSize getVisibleColumns headerFiltersElementRef? hideColumnMenu hideFilterPanel hideHeaderFilterMenu hidePreferences hydrateRowsMeta ignoreDiacritics isCellEditable isColumnPinned isRowSelectable isRowSelected mainElementRef moveFocusToRelativeCell observeRowHeight pinColumn publishEvent register registerControlState registerPipeApplier registerPipeProcessor registerStrategyProcessor requestPipeProcessorsApplication resetColSpan resetDataSourceState resetRowHeights resize restoreState rootProps rowHasAutoHeight runPendingEditCellValueMutation scroll scrollToIndexes selectRow selectRowRange selectRows setCellEditingEditCellValue setCellFocus setColumnGroupHeaderFocus setColumnHeaderFilterFocus setColumnHeaderFocus setColumnIndex setColumnVisibility setColumnVisibilityModel setColumnWidth setDensity setEditCellValue setExpandedDetailPanels setFilterLogicOperator setFilterModel setLoading setPage setPageSize setPaginationMeta setPaginationModel setPinnedColumns setQuickFilterValues setRowChildrenExpansion setRowCount setRowEditingEditCellValue setRowIndex setRows setRowSelectionModel setSortModel setStrategyAvailability showColumnMenu showFilterPanel showHeaderFilterMenu showPreferences sortColumn startHeaderFilterEditMode state stopHeaderFilterEditMode storeDetailPanelHeight subscribeEvent toggleColumnMenu toggleDetailPanel unpinColumn unstable_dataSource unstable_replaceRows unstable_setColumnVirtualization unstable_setPinnedRows unstable_setVirtualization updateColumns updateControlState updateDimensions updateRenderContext? updateRows updateServerRows upsertFilterItem upsertFilterItems virtualScrollbarHorizontalRef virtualScrollbarVerticalRef virtualScrollerRef

Methods

Properties

applySorting: (() => void)

Applies the current sort model to the rows.

applyStrategyProcessor: (<P>(processorName: P, params: GridStrategyProcessingLookup[P]["params"]) => GridStrategyProcessingLookup[P]["value"])

Run the processor registered for the active strategy.

Type declaration

    • <P>(processorName, params): GridStrategyProcessingLookup[P]["value"]
    • Type Parameters

      • P extends keyof GridStrategyProcessingLookup

      Parameters

      • processorName: P

        The name of the processor to run.

      • params: GridStrategyProcessingLookup[P]["params"]

        Additional params to pass to the processor.

      Returns GridStrategyProcessingLookup[P]["value"]

      The value returned by the processor.

autosizeColumns: ((options?: GridAutosizeOptions) => Promise<void>)

Auto-size the columns of the grid based on the cells' content and the space available.

Type declaration

    • (options?): Promise<void>
    • Parameters

      Returns Promise<void>

      A promise that resolves when autosizing is completed

caches: GridApiCaches

The caches used by hooks and state initializers.

calculateColSpan: ((options: {
    columns: GridStateColDef[];
    maxLastColumn: number;
    minFirstColumn: number;
    rowId: GridRowId;
}) => void)

Calculate column spanning for each cell in the row

Type declaration

    • (options): void
    • Parameters

      • options: {
            columns: GridStateColDef[];
            maxLastColumn: number;
            minFirstColumn: number;
            rowId: GridRowId;
        }

        The options to apply on the calculation.

        • columns: GridStateColDef[]

          List of columns to calculate colSpan for

        • maxLastColumn: number

          Last visible column index

        • minFirstColumn: number

          First visible column index

        • rowId: GridRowId

          The row id

      Returns void

columnHeadersContainerRef: RefObject<null | HTMLDivElement>

The React ref of the grid column container virtualized div element.

deleteFilterItem: ((item: GridFilterItem) => void)

Deletes a [[GridFilterItem]].

Type declaration

    • (item): void
    • Parameters

      Returns void

detailPanelHasAutoHeight: ((id: GridRowId) => boolean)

Determines if the height of a detail panel is "auto".

Type declaration

    • (id): boolean
    • Parameters

      Returns boolean

      true if the detail panel height is "auto".

eventManager: EventManager

The generic event emitter manager.

exportDataAsCsv: ((options?: GridCsvExportOptions) => void)

Downloads and exports a CSV of the grid's data.

Type declaration

    • (options?): void
    • Parameters

      Returns void

exportDataAsPrint: ((options?: GridPrintExportOptions) => void)

Print the grid's data.

Type declaration

    • (options?): void
    • Parameters

      Returns void

exportState: ((params?: GridExportStateParams) => GridInitialStatePro)

Generates a serializable object containing the exportable parts of the DataGrid state. These values can then be passed to the initialState prop or injected using the restoreState method.

Type declaration

    • (params?): GridInitialStatePro
    • Parameters

      Returns GridInitialStatePro

      The exported state.

fetchRowChildren: ((id: GridRowId) => void)

Initiates the fetch of the children of a row.

Type declaration

    • (id): void
    • Parameters

      • id: GridRowId

        The id of the group to be fetched.

      Returns void

forceUpdate: (() => void)

Forces the grid to rerender. It's often used after a state update.

no longer needed.

getActiveStrategy: ((strategyGroup: "rowTree") => string)

Returns the name of the active strategy of a given strategy group

Type declaration

    • (strategyGroup): string
    • Parameters

      • strategyGroup: "rowTree"

        The group from which we want the active strategy.

      Returns string

      The name of the active strategy.

getAllColumns: (() => GridStateColDef[])

Returns an array of [[GridColDef]] containing all the column definitions.

Type declaration

    • (): GridStateColDef[]
    • Returns GridStateColDef[]

      An array of [[GridStateColDef]].

getAllGroupDetails: (() => GridColumnGroupLookup)

Returns the column group lookup.

Type declaration

    • (): GridColumnGroupLookup
    • Returns GridColumnGroupLookup

      The column group lookup.

getAllRowIds: (() => GridRowId[])

Gets the list of row ids. TODO rows v6: Rename or remove ?

Type declaration

getCellElement: ((id: GridRowId, field: string) => null | HTMLDivElement)

Gets the [[GridCellParams]] object that is passed as argument in events.

Type declaration

    • (id, field): null | HTMLDivElement
    • Parameters

      • id: GridRowId

        The id of the row.

      • field: string

        The column field.

      Returns null | HTMLDivElement

      The cell params.

getCellMode: ((id: GridRowId, field: string) => GridCellMode)

Gets the mode of a cell.

Type declaration

getCellParams: (<R, V, F, N>(id: GridRowId, field: string) => GridCellParams<R, V, F, N>)

Gets the [[GridCellParams]] object that is passed as argument in events.

Type declaration

getCellParamsForRow: (<R, V, F, N>(id: GridRowId, field: string, row: R, cellParams: {
    cellMode: GridCellMode;
    colDef: GridStateColDef;
    hasFocus: boolean;
    rowNode: N;
    tabIndex: -1 | 0;
}) => GridCellParams<R, V, F, N>)

Used internally to render the cell based on existing row data provided by the GridRow.

Type declaration

getCellValue: (<V>(id: GridRowId, field: string) => V)

Gets the value of a cell at the given id and field.

Type declaration

    • <V>(id, field): V
    • Type Parameters

      • V extends unknown = any

      Parameters

      • id: GridRowId

        The id of the row.

      • field: string

        The column field.

      Returns V

      The cell value.

getColumn: ((field: string) => GridStateColDef)

Returns the [[GridColDef]] for the given field.

Type declaration

    • (field): GridStateColDef
    • Parameters

      • field: string

        The column field.

      Returns GridStateColDef

      The [[GridStateColDef]].

getColumnGroupHeaderFocus: (() => null | GridColumnGroupIdentifier)

Gets the focus to the column group header at the given field and given depth.

Type declaration

getColumnGroupPath: ((field: string) => string[])

Returns the id of the groups leading to the requested column. The array is ordered by increasing depth (the last element is the direct parent of the column).

Type declaration

    • (field): string[]
    • Parameters

      • field: string

        The field of of the column requested.

      Returns string[]

      The id of the groups leading to the requested column.

getColumnHeaderElement: ((field: string) => null | HTMLDivElement)

Gets the underlying DOM element for the column header with the given field.

Type declaration

    • (field): null | HTMLDivElement
    • Parameters

      • field: string

        The column field.

      Returns null | HTMLDivElement

      The DOM element or null.

getColumnHeaderParams: ((field: string) => GridColumnHeaderParams<GridValidRowModel, any, any>)

Gets the [[GridColumnHeaderParams]] object that is passed as argument in events.

Type declaration

getColumnIndex: ((field: string, useVisibleColumns?: boolean) => number)

Returns the index position of a column. By default, only the visible columns are considered. Pass false to useVisibleColumns to consider all columns.

Type declaration

    • (field, useVisibleColumns?): number
    • Parameters

      • field: string

        The column field.

      • OptionaluseVisibleColumns: boolean

        Determines if all columns or the visible ones should be considered. Default is true.

      Returns number

      The index position.

getColumnIndexRelativeToVisibleColumns: ((field: string) => number)

Gets the index of a column relative to the columns that are reachable by scroll.

Type declaration

    • (field): number
    • Parameters

      • field: string

        The column field.

      Returns number

      The index of the column.

getColumnPosition: ((field: string) => number)

Returns the left-position of a column relative to the inner border of the grid.

Type declaration

    • (field): number
    • Parameters

      • field: string

        The column field.

      Returns number

      The position in pixels.

getDataAsCsv: ((options?: GridCsvExportOptions) => string)

Returns the grid data as a CSV string. This method is used internally by exportDataAsCsv.

Type declaration

    • (options?): string
    • Parameters

      Returns string

      The data in the CSV format.

getExpandedDetailPanels: (() => GridRowId[])

Returns the rows whose detail panel is open.

Type declaration

getFilterState: ((filterModel: GridFilterModel) => GridFilterState)

Returns the filter state for the given filter model without applying it to the Data Grid.

Type declaration

getInfiniteLoadingTriggerElement?: ((__namedParameters: {
    lastRowId: string | number;
}) => ReactNode)
getLastMeasuredRowIndex: (() => number)

Returns the index of the last row measured. The value considers only the rows reachable by scroll, for example first row has index=0 in all pages.

Type declaration

    • (): number
    • Returns number

      The index of the last measured row.

getLocaleText: (<T>(key: T) => GridLocaleText[T])

Returns the translation for the key.

Type declaration

getLogger: ((name: string) => Logger)

Type declaration

    • (name): Logger
    • Parameters

      • name: string

        The name of the logger

      Returns Logger

      Instance of the logger

getPinnedColumns: (() => GridPinnedColumnFields)

Returns which columns are pinned.

Type declaration

getPropagatedRowSelectionModel: ((inputSelectionModel: GridRowSelectionModel) => GridRowSelectionModel)

Returns the modified selection model after applying row selection propagation.

Use this to achieve proper rowSelectionPropagation behavior when setting the selection model using setRowSelectionModel.

Type declaration

getPublicApi: (() => GridApiPro)

Returns the public API. Can be useful on a feature hook if we want to pass the apiRef to a callback. Do not use it to access the public method in private parts of the codebase.

Type declaration

getRootDimensions: (() => GridDimensions)

Returns the dimensions of the grid

Type declaration

getRow: (<R>(id: GridRowId) => null | R)

Gets the row data with a given id.

Type declaration

getRowElement: ((id: GridRowId) => null | HTMLDivElement)

Gets the underlying DOM element for a row at the given id.

Type declaration

    • (id): null | HTMLDivElement
    • Parameters

      Returns null | HTMLDivElement

      The DOM element or null.

getRowGroupChildren: ((params: GridRowGroupChildrenGetterParams) => GridRowId[])

Gets the rows of a grouping criteria. Only contains the rows provided to the grid, not the rows automatically generated by it.

Type declaration

getRowHeightEntry: ((id: GridRowId) => HeightEntry)

Get the height entry from the cache or create one.

Type declaration

    • (id): HeightEntry
    • Parameters

      Returns HeightEntry

      The height cache entry

getRowId: (<R>(row: R) => GridRowId)

Gets the ID of a row given its data.

Type declaration

getRowIdFromRowIndex: ((index: number) => GridRowId)

Gets the GridRowId of a row at a specific index. The index is based on the sorted but unfiltered row list.

Type declaration

    • (index): GridRowId
    • Parameters

      • index: number

        The index of the row

      Returns GridRowId

      The GridRowId of the row.

getRowIndexRelativeToVisibleRows: ((id: GridRowId) => number)

Gets the index of a row relative to the rows that are reachable by scroll.

Type declaration

    • (id): number
    • Parameters

      Returns number

      The index of the row.

getRowMode: ((id: GridRowId) => GridRowMode)

Gets the mode of a row.

Type declaration

getRowModels: (() => Map<GridRowId, GridValidRowModel>)

Gets the full set of rows as [[Map<GridRowId, GridRowModel>]].

Type declaration

getRowNode: (<N>(id: GridRowId) => null | N)

Gets the row node from the internal tree structure.

Type declaration

    • <N>(id): null | N
    • Type Parameters

      Parameters

      Returns null | N

      The tree node.

getRowParams: ((id: GridRowId) => GridRowParams<any>)

Gets the [[GridRowParams]] object that is passed as argument in events.

Type declaration

getRowsCount: (() => number)

Gets the total number of rows in the grid.

Type declaration

    • (): number
    • Returns number

      The number of rows.

getRowWithUpdatedValues: ((id: GridRowId, field: string) => GridValidRowModel)

Returns the row with the values that were set by editing the cells. In row editing, field is ignored and all fields are considered.

Type declaration

getRowWithUpdatedValuesFromCellEditing: ((id: GridRowId, field: string) => GridValidRowModel)

Returns the row with the new value that was set by editing the cell.

Type declaration

getRowWithUpdatedValuesFromRowEditing: ((id: GridRowId) => GridValidRowModel)

Returns the row with the values that were set by editing all cells.

Type declaration

getScrollPosition: (() => GridScrollParams)

Returns the current scroll position.

Type declaration

getSelectedRows: (() => Map<GridRowId, GridValidRowModel>)

Returns an array of the selected rows.

Type declaration

getSortedRowIds: (() => GridRowId[])

Returns all row ids sorted according to the active sort model.

Type declaration

getSortedRows: (() => GridValidRowModel[])

Returns all rows sorted according to the active sort model.

Type declaration

getSortModel: (() => GridSortModel)

Returns the sort model currently applied to the grid.

Type declaration

getViewportPageSize: (() => number)

Returns the amount of rows that are currently visible in the viewport

Type declaration

    • (): number
    • Returns number

      The amount of rows visible in the viewport

getVisibleColumns: (() => GridStateColDef[])

Returns the currently visible columns.

Type declaration

    • (): GridStateColDef[]
    • Returns GridStateColDef[]

      An array of [[GridStateColDef]].

headerFiltersElementRef?: RefObject<null | HTMLDivElement>

The React ref of the grid header filter row element.

hideColumnMenu: (() => void)

Hides the column menu that is open.

hideFilterPanel: (() => void)

Hides the filter panel.

hideHeaderFilterMenu: (() => void)

Hides the header filter menu.

hidePreferences: (() => void)

Hides the preferences panel.

hydrateRowsMeta: (() => void)
ignoreDiacritics: boolean

Returns the value of the ignoreDiacritics prop.

isCellEditable: ((params: GridCellParams<any, unknown, unknown, GridTreeNode>) => boolean)

Controls if a cell is editable.

Type declaration

    • (params): boolean
    • Parameters

      Returns boolean

      A boolean value determining if the cell is editable.

isColumnPinned: ((field: string) => false | GridPinnedColumnPosition)

Returns which side a column is pinned to.

Type declaration

isRowSelectable: ((id: GridRowId) => boolean)

Determines if a row can be selected or not.

Type declaration

    • (id): boolean
    • Parameters

      Returns boolean

      A boolean indicating if the row can be selected.

isRowSelected: ((id: GridRowId) => boolean)

Determines if a row is selected or not.

Type declaration

    • (id): boolean
    • Parameters

      Returns boolean

      A boolean indicating if the row is selected.

mainElementRef: RefObject<null | HTMLDivElement>

The React ref of the grid main container div element.

moveFocusToRelativeCell: ((id: GridRowId, field: string, direction: "left" | "right" | "below") => void)

Moves the focus to the cell situated at the given direction. If field is the last and direction=right, the focus goes to the next row. If field is the first and direction=left, the focus goes to the previous row.

Type declaration

    • (id, field, direction): void
    • Parameters

      • id: GridRowId

        The base row id.

      • field: string

        The base column field.

      • direction: "left" | "right" | "below"

        Which direction is the next cell to focus.

      Returns void

observeRowHeight: ((element: Element, rowId: GridRowId) => void | Destructor)

Observe row for 'auto' height changes.

Type declaration

    • (element, rowId): void | Destructor
    • Parameters

      • element: Element

        The row element to observe.

      • rowId: GridRowId

        The id of the row.

      Returns void | Destructor

      A dispose callback

pinColumn: ((field: string, side: GridPinnedColumnPosition) => void)

Pins a column to the left or right side of the grid.

Type declaration

    • (field, side): void
    • Parameters

      Returns void

publishEvent: GridEventPublisher

Emits an event.

The name of the event.

Arguments to be passed to the handlers.

The event object to pass forward.

register: (<V, T>(visibility: V, methods: T) => void)
registerControlState: (<E>(controlState: GridControlStateItem<GridStatePro, E>) => void)

Updates a control state that binds the model, the onChange prop, and the grid state together.

Type declaration

    • <E>(controlState): void
    • Type Parameters

      • E extends keyof GridControlledStateEventLookup

      Parameters

      • controlState: GridControlStateItem<GridStatePro, E>

        The [[GridControlStateItem]] to be registered.

      Returns void

registerPipeApplier: ((group: keyof GridPipeProcessingLookup, id: string, applier: (() => void)) => (() => void))

Register an applier.

Type declaration

    • (group, id, applier): (() => void)
    • Parameters

      • group: keyof GridPipeProcessingLookup

        The group of this applier

      • id: string

        An unique and static identifier of the applier.

      • applier: (() => void)

        The applier to register.

          • (): void
          • Returns void

      Returns (() => void)

      A function to unregister the applier.

        • (): void
        • Returns void

registerPipeProcessor: (<G>(group: keyof GridPipeProcessingLookup, id: string, processor: GridPipeProcessor<G>) => (() => void))

Register a processor and run all the appliers of the group.

Type declaration

    • <G>(group, id, processor): (() => void)
    • Type Parameters

      • G extends keyof GridPipeProcessingLookup

      Parameters

      • group: keyof GridPipeProcessingLookup

        The group on which this processor should be applied.

      • id: string

        An unique and static identifier of the processor.

      • processor: GridPipeProcessor<G>

        The processor to register.

      Returns (() => void)

      A function to unregister the processor.

        • (): void
        • Returns void

registerStrategyProcessor: (<P>(strategyName: string, processorName: P, processor: GridStrategyProcessor<P>) => (() => void))

Registers a strategy processor. If the strategy is active, it emits an event to notify the agents to re-apply the processor.

Type declaration

    • <P>(strategyName, processorName, processor): (() => void)
    • Type Parameters

      • P extends keyof GridStrategyProcessingLookup

      Parameters

      • strategyName: string

        The name of the strategy on which this processor should be applied.

      • processorName: P

        The name of the processor.

      • processor: GridStrategyProcessor<P>

        The processor to register.

      Returns (() => void)

      A function to unregister the processor.

        • (): void
        • Returns void

requestPipeProcessorsApplication: ((group: keyof GridPipeProcessingLookup) => void)

Imperatively run all the appliers of a group. Most of the time, the applier should run because a processor is re-registered, but sometimes we want to re-apply the processing even if the processor deps have not changed. This may occur when the change requires a isDeepEqual check.

Type declaration

    • (group): void
    • Parameters

      • group: keyof GridPipeProcessingLookup

        The group to apply.

      Returns void

resetColSpan: (() => void)

Reset the colspan cache

resetDataSourceState: (() => void)

Resets the data source state.

resetRowHeights: (() => void)

Forces the recalculation of the heights of all rows.

resize: (() => void)

Triggers a resize of the component and recalculation of width and height.

restoreState: ((stateToRestore: GridInitialStatePro) => void)

Inject the given values into the state of the DataGrid.

Type declaration

    • (stateToRestore): void
    • Parameters

      • stateToRestore: GridInitialStatePro

        The exported state to restore.

      Returns void

rootProps: DataGridProProcessedProps<any>

Allows to access the root props outside of the React component. Do not use in React components - use the useGridRootProps hook instead.

rowHasAutoHeight: ((id: GridRowId) => boolean)

Determines if the height of a row is "auto".

Type declaration

    • (id): boolean
    • Parameters

      Returns boolean

      True if the row height is "auto", false otherwise.

runPendingEditCellValueMutation: ((id: GridRowId, field?: string) => void)

Immediately updates the value of the cell, without waiting for the debounce.

Type declaration

    • (id, field?): void
    • Parameters

      • id: GridRowId

        The row id.

      • Optionalfield: string

        The field to update. If not passed, updates all fields in the given row id.

      Returns void

scroll: ((params: Partial<GridScrollParams>) => void)

Triggers the viewport to scroll to the given positions (in pixels).

Type declaration

    • (params): void
    • Parameters

      • params: Partial<GridScrollParams>

        An object containing the left or top position to scroll.

      Returns void

scrollToIndexes: ((params: Partial<GridCellIndexCoordinates>) => boolean)

Triggers the viewport to scroll to the cell at indexes given by params. Returns true if the grid had to scroll to reach the target.

Type declaration

    • (params): boolean
    • Parameters

      Returns boolean

      Returns true if the index was outside of the viewport and the grid had to scroll to reach the target.

selectRow: ((id: GridRowId, isSelected?: boolean, resetSelection?: boolean) => void)

Change the selection state of a row.

Type declaration

    • (id, isSelected?, resetSelection?): void
    • Parameters

      • id: GridRowId

        The id of the row.

      • OptionalisSelected: boolean

        Pass false to unselect a row. Default is true.

      • OptionalresetSelection: boolean

        Whether to reset the already selected rows or not. Default is false.

      Returns void

selectRowRange: ((range: {
    endId: GridRowId;
    startId: GridRowId;
}, isSelected?: boolean, resetSelection?: boolean) => void)

Change the selection state of all the selectable rows in a range.

Type declaration

    • (range, isSelected?, resetSelection?): void
    • Parameters

      • range: {
            endId: GridRowId;
            startId: GridRowId;
        }

        The range of rows to select.

      • OptionalisSelected: boolean

        The new selection state. Default is true.

      • OptionalresetSelection: boolean

        Whether to reset the selected rows outside of the range or not. Default is false.

      Returns void

selectRows: ((ids: GridRowId[], isSelected?: boolean, resetSelection?: boolean) => void)

Change the selection state of multiple rows.

Type declaration

    • (ids, isSelected?, resetSelection?): void
    • Parameters

      • ids: GridRowId[]

        The row ids.

      • OptionalisSelected: boolean

        The new selection state. Default is true.

      • OptionalresetSelection: boolean

        Whether to reset the already selected rows or not. Default is false.

      Returns void

setCellEditingEditCellValue: ((params: GridEditCellValueParams) => Promise<boolean>)

Updates the value of a cell being edited. Don't call this method directly, prefer setEditCellValue.

Type declaration

    • (params): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      Resolves with true when the new value is valid.

setCellFocus: ((id: GridRowId, field: string) => void)

Sets the focus to the cell at the given id and field.

Type declaration

    • (id, field): void
    • Parameters

      • id: GridRowId

        The row id.

      • field: string

        The column field.

      Returns void

setColumnGroupHeaderFocus: ((field: string, depth: number, event?: MuiBaseEvent) => void)

Sets the focus to the column group header at the given field and given depth.

Type declaration

    • (field, depth, event?): void
    • Parameters

      • field: string

        The column field.

      • depth: number

        The group depth.

      • Optionalevent: MuiBaseEvent

        The event that triggers the action.

      Returns void

setColumnHeaderFilterFocus: ((field: string, event?: MuiBaseEvent) => void)

Sets the focus to the column header filter at the given field.

Type declaration

    • (field, event?): void
    • Parameters

      • field: string

        The column field.

      • Optionalevent: MuiBaseEvent

        The event that triggers the action.

      Returns void

setColumnHeaderFocus: ((field: string, event?: MuiBaseEvent) => void)

Sets the focus to the column header at the given field.

Type declaration

    • (field, event?): void
    • Parameters

      • field: string

        The column field.

      • Optionalevent: MuiBaseEvent

        The event that triggers the action.

      Returns void

setColumnIndex: ((field: string, targetIndexPosition: number) => void)

Moves a column from its original position to the position given by targetIndexPosition.

Type declaration

    • (field, targetIndexPosition): void
    • Parameters

      • field: string

        The field name

      • targetIndexPosition: number

        The new position (0-based).

      Returns void

setColumnVisibility: ((field: string, isVisible: boolean) => void)

Changes the visibility of the column referred by field.

Type declaration

    • (field, isVisible): void
    • Parameters

      • field: string

        The column to change visibility.

      • isVisible: boolean

        Pass true to show the column, or false to hide it. Default is false

      Returns void

setColumnVisibilityModel: ((model: GridColumnVisibilityModel) => void)

Sets the column visibility model to the one given by model.

Type declaration

setColumnWidth: ((field: string, width: number) => void)

Updates the width of a column.

Type declaration

    • (field, width): void
    • Parameters

      • field: string

        The column field.

      • width: number

        The new width.

      Returns void

setDensity: ((density: GridDensity) => void)

Sets the density of the grid.

Type declaration

    • (density): void
    • Parameters

      • density: GridDensity

        Can be: "compact", "standard", "comfortable".

      Returns void

setEditCellValue: ((params: GridEditCellValueParams, event?: MuiBaseEvent) => void | Promise<boolean>)

Sets the value of the edit cell. Commonly used inside the edit cell component.

Type declaration

    • (params, event?): void | Promise<boolean>
    • Parameters

      Returns void | Promise<boolean>

      A promise with the validation status.

setExpandedDetailPanels: ((ids: GridRowId[]) => void)

Changes which rows to expand the detail panel.

Type declaration

    • (ids): void
    • Parameters

      • ids: GridRowId[]

        The ids of the rows to open the detail panel.

      Returns void

setFilterLogicOperator: ((operator: GridLogicOperator) => void)

Changes the [[GridLogicOperator]] used to connect the filters.

Type declaration

    • (operator): void
    • Parameters

      Returns void

setFilterModel: ((model: GridFilterModel, reason?:
    | "upsertFilterItem"
    | "upsertFilterItems"
    | "deleteFilterItem"
    | "changeLogicOperator"
    | "restoreState"
    | "removeAllFilterItems") => void)

Sets the filter model to the one given by model.

Type declaration

    • (model, reason?): void
    • Parameters

      • model: GridFilterModel

        The new filter model.

      • Optionalreason:
            | "upsertFilterItem"
            | "upsertFilterItems"
            | "deleteFilterItem"
            | "changeLogicOperator"
            | "restoreState"
            | "removeAllFilterItems"

        The reason for the model to have changed.

      Returns void

setLoading: ((loading: boolean) => void)

Sets the internal loading state.

Type declaration

    • (loading): void
    • Parameters

      • loading: boolean

        If true the loading indicator will be shown over the Data Grid.

      Returns void

setPage: ((page: number) => void)

Sets the displayed page to the value given by page.

Type declaration

    • (page): void
    • Parameters

      • page: number

        The new page number.

      Returns void

setPageSize: ((pageSize: number) => void)

Sets the number of displayed rows to the value given by pageSize.

Type declaration

    • (pageSize): void
    • Parameters

      • pageSize: number

        The new number of displayed rows.

      Returns void

setPaginationMeta: ((paginationMeta: GridPaginationMeta) => void)

Sets the paginationMeta to a new value.

Type declaration

    • (paginationMeta): void
    • Parameters

      Returns void

setPaginationModel: ((model: GridPaginationModel) => void)

Sets the paginationModel to a new value.

Type declaration

setPinnedColumns: ((pinnedColumns: GridPinnedColumnFields) => void)

Changes the pinned columns.

Type declaration

    • (pinnedColumns): void
    • Parameters

      Returns void

setQuickFilterValues: ((values: any[]) => void)

Set the quick filter values to the one given by values

Type declaration

    • (values): void
    • Parameters

      • values: any[]

        The list of element to quick filter

      Returns void

setRowChildrenExpansion: ((id: GridRowId, isExpanded: boolean) => void)

Expand or collapse a row children.

Type declaration

    • (id, isExpanded): void
    • Parameters

      • id: GridRowId

        the ID of the row to expand or collapse.

      • isExpanded: boolean

        A boolean indicating if the row must be expanded or collapsed.

      Returns void

setRowCount: ((rowCount: number) => void)

Sets the rowCount to a new value.

Type declaration

    • (rowCount): void
    • Parameters

      • rowCount: number

        The new row count value.

      Returns void

setRowEditingEditCellValue: ((params: GridEditCellValueParams) => Promise<boolean>)

Updates the value of a cell being edited. Don't call this method directly, prefer setEditCellValue.

Type declaration

    • (params): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      Resolves with true when all values in the row are valid.

setRowIndex: ((rowId: GridRowId, targetIndex: number) => void)

Moves a row from its original position to the position given by targetIndex.

Type declaration

    • (rowId, targetIndex): void
    • Parameters

      • rowId: GridRowId

        The row id

      • targetIndex: number

        The new position (0-based).

      Returns void

setRows: ((rows: GridValidRowModel[]) => void)

Sets a new set of rows.

Type declaration

setRowSelectionModel: ((rowSelectionModel: GridRowSelectionModel) => void)

Sets the new row selection model.

⚠️ Caution: setRowSelectionModel doesn't apply the selection propagation automatically. Pass model returned by API method getPropagatedRowSelectionModel instead to apply the selection propagation.

Type declaration

    • (rowSelectionModel): void
    • Parameters

      Returns void

setSortModel: ((model: GridSortModel) => void)

Updates the sort model and triggers the sorting of rows.

Type declaration

    • (model): void
    • Parameters

      Returns void

setStrategyAvailability: ((strategyGroup: "rowTree", strategyName: string, callback: (() => boolean)) => void)

Set a callback to know if a strategy is available.

Type declaration

    • (strategyGroup, strategyName, callback): void
    • Parameters

      • strategyGroup: "rowTree"

        The group for which we set strategy availability.

      • strategyName: string

        The name of the strategy.

      • callback: (() => boolean)

        A callback to know if this strategy is available.

          • (): boolean
          • Returns boolean

      Returns void

showColumnMenu: ((field: string) => void)

Display the column menu under the field column.

Type declaration

    • (field): void
    • Parameters

      • field: string

        The column to display the menu.

      Returns void

showFilterPanel: ((targetColumnField?: string, panelId?: string, labelId?: string) => void)

Shows the filter panel. If targetColumnField is given, a filter for this field is also added.

Type declaration

    • (targetColumnField?, panelId?, labelId?): void
    • Parameters

      • OptionaltargetColumnField: string

        The column field to add a filter.

      • OptionalpanelId: string

        The unique panel id

      • OptionallabelId: string

        The unique button id

      Returns void

showHeaderFilterMenu: ((field: string) => void)

Opens the header filter menu for the given field.

Type declaration

    • (field): void
    • Parameters

      • field: string

        The field of the header filter to open menu for.

      Returns void

showPreferences: ((newValue: GridPreferencePanelsValue, panelId?: string, labelId?: string) => void)

Displays the preferences panel. The newValue argument controls the content of the panel.

Type declaration

    • (newValue, panelId?, labelId?): void
    • Parameters

      • newValue: GridPreferencePanelsValue

        The panel to open. Use "filters" or "columns".

      • OptionalpanelId: string

        The unique panel id

      • OptionallabelId: string

        The unique button id

      Returns void

sortColumn: ((field: string, direction?: GridSortDirection, allowMultipleSorting?: boolean) => void)

Sorts a column.

Type declaration

    • (field, direction?, allowMultipleSorting?): void
    • Parameters

      • field: string

        The field identifier of the column to be sorted.

      • Optionaldirection: GridSortDirection

        The direction to be sorted. By default, the next in the sortingOrder prop.

      • OptionalallowMultipleSorting: boolean

        Whether to keep the existing [[GridSortItem]]. Default is false.

      Returns void

startHeaderFilterEditMode: ((field: string) => void)

Puts the cell corresponding to the given row id and field into edit mode.

Type declaration

    • (field): void
    • Parameters

      • field: string

        The field of the header filter to put in edit mode.

      Returns void

state: GridStatePro

Property that contains the whole state of the grid.

stopHeaderFilterEditMode: (() => void)

Stops the edit mode for the current field.

storeDetailPanelHeight: ((id: GridRowId, height: number) => void)

Stores the panel height measurement and triggers the row height pre-processing.

Type declaration

    • (id, height): void
    • Parameters

      • id: GridRowId

        The id of the row.

      • height: number

        The new height.

      Returns void

subscribeEvent: (<E>(event: E, handler: GridEventListener<E>, options?: EventListenerOptions) => (() => void))

Registers a handler for an event.

Type declaration

    • <E>(event, handler, options?): (() => void)
    • Type Parameters

      • E extends keyof GridEventLookup

      Parameters

      • event: E

        The name of the event.

      • handler: GridEventListener<E>

        The handler to be called.

      • Optionaloptions: EventListenerOptions

        Additional options for this listener.

      Returns (() => void)

      A function to unsubscribe from this event.

        • (): void
        • Returns void

toggleColumnMenu: ((field: string) => void)

Toggles the column menu under the field column.

Type declaration

    • (field): void
    • Parameters

      • field: string

        The field name to toggle the column menu.

      Returns void

toggleDetailPanel: ((id: GridRowId) => void)

Expands or collapses the detail panel of a row.

Type declaration

    • (id): void
    • Parameters

      • id: GridRowId

        The row id to toggle the panel.

      Returns void

unpinColumn: ((field: string) => void)

Unpins a column.

Type declaration

    • (field): void
    • Parameters

      • field: string

        The column field to unpin.

      Returns void

unstable_dataSource: GridDataSourceApiBase

The data source API.

unstable_replaceRows: ((firstRowToReplace: number, newRows: GridValidRowModel[]) => void)

Replace a set of rows with new rows.

Type declaration

    • (firstRowToReplace, newRows): void
    • Parameters

      • firstRowToReplace: number

        The index of the first row to be replaced.

      • newRows: GridValidRowModel[]

        The new rows.

      Returns void

unstable_setColumnVirtualization: ((enabled: boolean) => void)

Enable/disable column virtualization.

Type declaration

    • (enabled): void
    • Parameters

      • enabled: boolean

        The enabled value for column virtualization

      Returns void

unstable_setPinnedRows: ((pinnedRows?: GridPinnedRowsProp<GridValidRowModel>) => void)

Changes the pinned rows.

Type declaration

unstable_setVirtualization: ((enabled: boolean) => void)

Enable/disable virtualization.

Type declaration

    • (enabled): void
    • Parameters

      • enabled: boolean

        The enabled value for virtualization

      Returns void

updateColumns: ((cols: GridColDef[]) => void)

Updates the definition of multiple columns at the same time.

Type declaration

    • (cols): void
    • Parameters

      • cols: GridColDef[]

        The new column [[GridColDef]] objects.

      Returns void

updateControlState: (<K>(key: K, state: ((oldState: GridStatePro[K]) => GridStatePro[K]), reason?: GridControlledStateReasonLookup[K]) => boolean)

Updates a single sub-state. Publishes the xxxChange event and calls the onXXXChange prop.

Type declaration

    • <K>(key, state, reason?): boolean
    • Type Parameters

      Parameters

      • key: K

        Which key of the state to update.

      • state: ((oldState: GridStatePro[K]) => GridStatePro[K])

        The new state of the sub-state to update.

          • (oldState): GridStatePro[K]
          • Parameters

            • oldState: GridStatePro[K]

            Returns GridStatePro[K]

      • Optionalreason: GridControlledStateReasonLookup[K]

        The reason to pass to the callback prop and event.

      Returns boolean

      true if the state has been successfully updated.

updateDimensions: (() => void)

Recalculates the grid layout. This should be called when an operation has changed the size of the content of the grid.

updateRenderContext?: (() => void)

Update grid rendering context.

Type declaration

    • (): void
    • Returns void

      The GridRenderContext.

updateRows: ((updates: GridRowModelUpdate[]) => void)

Allows to update, insert and delete rows.

Type declaration

    • (updates): void
    • Parameters

      Returns void

updateServerRows: ((updates: GridRowModelUpdate[], groupKeys?: string[]) => void)

Allows to update, insert and delete rows at a specific nested level.

Type declaration

    • (updates, groupKeys?): void
    • Parameters

      • updates: GridRowModelUpdate[]

        An array of rows with an action specifying what to do.

      • OptionalgroupKeys: string[]

        The group keys of the rows to update.

      Returns void

upsertFilterItem: ((item: GridFilterItem) => void)

Updates or inserts a [[GridFilterItem]].

Type declaration

    • (item): void
    • Parameters

      Returns void

upsertFilterItems: ((items: GridFilterItem[]) => void)

Updates or inserts many [[GridFilterItem]].

Type declaration

    • (items): void
    • Parameters

      Returns void

virtualScrollbarHorizontalRef: RefObject<null | HTMLDivElement>

The React ref of the grid's horizontal virtual scrollbar container element.

virtualScrollbarVerticalRef: RefObject<null | HTMLDivElement>

The React ref of the grid's vertical virtual scrollbar container element.

virtualScrollerRef: RefObject<null | HTMLDivElement>

The React ref of the grid's virtual scroller container element.

Methods

  • Puts the cell corresponding to the given row id and field into edit mode.

    Parameters

    • params: GridStartCellEditModeParams

      The row id and field of the cell to edit.

    Returns void

  • Puts the row corresponding to the given id into edit mode.

    Parameters

    • params: GridStartRowEditModeParams

      The row id edit.

    Returns void

  • Puts the cell corresponding to the given row id and field into view mode and updates the original row with the new value stored. If params.ignoreModifications is true it will discard the modifications made.

    Parameters

    • params: GridStopCellEditModeParams

      The row id and field of the cell to stop editing.

    Returns void

  • Puts the row corresponding to the given id and into view mode and updates the original row with the new values stored. If params.ignoreModifications is true it will discard the modifications made.

    Parameters

    • params: GridStopRowEditModeParams

      The row id and field of the cell to stop editing.

    Returns void