Skip to content

DataGridPremium API

API documentation for the React DataGridPremium component. Learn about the available props and the CSS API.

Import

import { DataGridPremium } from '@mui/x-data-grid-premium';
You can learn about the difference by reading this guide on minimizing bundle size.

Component name

The name MuiDataGridPremium can be used when providing default props or style overrides in the theme.

Props

NameTypeDefaultDescription
columns*Array<object>
Set of columns of type GridColumns.
rows*array
Set of rows of type GridRowsProp.
apiRef{ current: object }
The ref object that allows grid manipulation. Can be instantiated with useGridApiRef().
aria-labelstring
The label of the grid.
aria-labelledbystring
The id of the element containing a label for the grid.
autoHeightboolfalse
If true, the grid height is dynamic and follow the number of rows in the grid.
autoPageSizeboolfalse
If true, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.
cellModesModelobject
Controls the modes of the cells.
checkboxSelectionboolfalse
If true, the grid get a first column with a checkbox that allows to select rows.
checkboxSelectionVisibleOnlyboolfalse
If true, the "Select All" header checkbox selects only the rows on the current page. To be used in combination with checkboxSelection. It only works if the pagination is enabled.
classesobject
Override or extend the styles applied to the component. See CSS API below for more details.
columnBuffernumber3
Number of extra columns to be rendered before/after the visible slice.
columnThresholdnumber3
Number of rows from the columnBuffer that can be visible before a new slice is rendered.
columnTypesobject
Extend native column types with your new column types.
columnVisibilityModelobject
Set the column visibility model of the grid. If defined, the grid will ignore the hide property in GridColDef.
componentsobject
Overrideable components.
componentsPropsobject
Overrideable components props dynamically passed to the component at rendering.
defaultGroupingExpansionDepthnumber0
If above 0, the row children will be expanded up to this depth. If equal to -1, all the row children will be expanded.
density'comfortable'
| 'compact'
| 'standard'
"standard"
Set the density of the grid.
detailPanelExpandedRowIdsArray<number
| string>
The row ids to show the detail panel.
disableChildrenFilteringboolfalse
If true, the filtering will only be applied to the top level rows when grouping rows with the treeData prop.
disableChildrenSortingboolfalse
If true, the sorting will only be applied to the top level rows when grouping rows with the treeData prop.
disableColumnFilterboolfalse
If true, column filters are disabled.
disableColumnMenuboolfalse
If true, the column menu is disabled.
disableColumnPinningboolfalse
If true, the column pinning is disabled.
disableColumnReorderboolfalse
If true, reordering columns is disabled.
disableColumnResizeboolfalse
If true, resizing columns is disabled.
disableColumnSelectorboolfalse
If true, hiding/showing columns is disabled.
disableDensitySelectorboolfalse
If true, the density selector is disabled.
disableExtendRowFullWidthboolfalse
If true, rows will not be extended to fill the full width of the grid container.
disableMultipleColumnsFilteringboolfalse
If true, filtering with multiple columns is disabled.
disableMultipleColumnsSortingboolfalse
If true, sorting with multiple columns is disabled.
disableMultipleSelectionboolfalse
If true, multiple selection using the Ctrl or CMD key is disabled.
disableRowGroupingboolfalse
If true, the row grouping is disabled.
disableSelectionOnClickboolfalse
If true, the selection on click on a row or cell is disabled.
disableVirtualizationboolfalse
If true, the virtualization is disabled.
editMode'cell'
| 'row'
"cell"
Controls whether to use the cell or row editing.
editRowsModelobject
Set the edit rows model of the grid.
errorany
An error that will turn the grid into its error state and display the error component.
experimentalFeatures{ newEditingApi?: bool, preventCommitWhileValidating?: bool, rowGrouping?: bool, warnIfFocusStateIsNotSynced?: bool }
Features under development. For each feature, if the flag is not explicitly set to true, the feature will be fully disabled and any property / method call will not have any effect.
filterMode'client'
| 'server'
"client"
Filtering can be processed on the server or client-side. Set it to 'server' if you would like to handle filtering on the server-side.
filterModel{ items: Array<{ columnField: string, id?: number
| string, operatorValue?: string, value?: any }>, linkOperator?: 'and'
| 'or', quickFilterLogicOperator?: 'and'
| 'or', quickFilterValues?: array }
Set the filter model of the grid.
getCellClassNamefunc
Function that applies CSS classes dynamically on cells.

Signature:
function(params: GridCellParams) => string
params: With all properties from GridCellParams.
returns (string): The CSS class to apply to the cell.
getDetailPanelContentfunc
Function that returns the element to render in row detail.

Signature:
function(params: GridRowParams) => JSX.Element
params: With all properties from GridRowParams.
returns (JSX.Element): The row detail element.
getDetailPanelHeightfunc"() => 500"
Function that returns the height of the row detail panel.

Signature:
function(params: GridRowParams) => number
params: With all properties from GridRowParams.
returns (number): The height in pixels.
getRowClassNamefunc
Function that applies CSS classes dynamically on rows.

Signature:
function(params: GridRowClassNameParams) => string
params: With all properties from GridRowClassNameParams.
returns (string): The CSS class to apply to the row.
getRowHeightfunc
Function that sets the row height per row.

Signature:
function(params: GridRowHeightParams) => GridRowHeightReturnValue
params: With all properties from GridRowHeightParams.
returns (GridRowHeightReturnValue): The row height value. If null or undefined then the default row height is applied.
getRowIdfunc
Return the id of a given GridRowModel.
getRowSpacingfunc
Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.
getTreeDataPathfunc
Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.
groupingColDeffunc
| object
The grouping column used by the tree data.
headerHeightnumber56
Set the height in pixel of the column headers in the grid.
hideFooterboolfalse
If true, the footer component is hidden.
hideFooterPaginationboolfalse
If true, the pagination component in the footer is hidden.
hideFooterRowCountboolfalse
If true, the row count in the footer is hidden. It has no effect if the pagination is enabled.
hideFooterSelectedRowCountboolfalse
If true, the selected row count in the footer is hidden.
initialStateobject
The initial state of the DataGridPremium. The data in it will be set in the state on initialization but will not be controlled. If one of the data in initialState is also being controlled, then the control state wins.
isCellEditablefunc
Callback fired when a cell is rendered, returns true if the cell is editable.

Signature:
function(params: GridCellParams) => boolean
params: With all properties from GridCellParams.
returns (boolean): A boolean indicating if the cell is editable.
isGroupExpandedByDefaultfunc
Determines if a group should be expanded after its creation. This prop takes priority over the defaultGroupingExpansionDepth prop.

Signature:
function(node: GridRowTreeNodeConfig) => boolean
node: The node of the group to test.
returns (boolean): A boolean indicating if the group is expanded.
isRowSelectablefunc
Determines if a row can be selected.

Signature:
function(params: GridRowParams) => boolean
params: With all properties from GridRowParams.
returns (boolean): A boolean indicating if the cell is selectable.
keepNonExistentRowsSelectedboolfalse
If true, the selection model will retain selected rows that do not exist. Useful when using server side pagination and row selections need to be retained when changing pages.
loadingboolfalse
If true, a loading overlay is displayed.
localeTextobject
Set the locale text of the grid. You can find all the translation keys supported in the source in the GitHub repository.
logger{ debug: func, error: func, info: func, warn: func }console
Pass a custom logger in the components that implements the Logger interface.
logLevel'debug'
| 'error'
| 'info'
| 'warn'
| false
"debug"
Allows to pass the logging level or false to turn off logging.
noncestring
Nonce of the inline styles for Content Security Policy.
onCellClickfunc
Callback fired when any cell is clicked.

Signature:
function(params: GridCellParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridCellParams.
event: The event object.
details: Additional details for this callback.
onCellDoubleClickfunc
Callback fired when a double click event comes from a cell element.

Signature:
function(params: GridCellParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridCellParams.
event: The event object.
details: Additional details for this callback.
onCellEditCommitfunc
Callback fired when the cell changes are committed.

Signature:
function(params: GridCellEditCommitParams, event: MuiEvent<MuiBaseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridCellEditCommitParams.
event: The event that caused this prop to be called.
details: Additional details for this callback.
onCellEditStartfunc
Callback fired when the cell turns to edit mode.

Signature:
function(params: GridCellParams, event: MuiEvent<React.KeyboardEvent | React.MouseEvent>) => void
params: With all properties from GridCellParams.
event: The event that caused this prop to be called.
onCellEditStopfunc
Callback fired when the cell turns to view mode.

Signature:
function(params: GridCellParams, event: MuiEvent<MuiBaseEvent>) => void
params: With all properties from GridCellParams.
event: The event that caused this prop to be called.
onCellFocusOutfunc
Callback fired when a cell loses focus.

Signature:
function(params: GridCellParams, event: MuiEvent<MuiBaseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridCellParams.
event: The event object.
details: Additional details for this callback.
onCellKeyDownfunc
Callback fired when a keydown event comes from a cell element.

Signature:
function(params: GridCellParams, event: MuiEvent<React.KeyboardEvent>, details: GridCallbackDetails) => void
params: With all properties from GridCellParams.
event: The event object.
details: Additional details for this callback.
onCellModesModelChangefunc
Callback fired when the cellModesModel prop changes.

Signature:
function(cellModesModel: GridCellModesModel, details: GridCallbackDetails) => void
cellModesModel: Object containig which cells are in "edit" mode.
details: Additional details for this callback.
onColumnHeaderClickfunc
Callback fired when a click event comes from a column header element.

Signature:
function(params: GridColumnHeaderParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnHeaderParams.
event: The event object.
details: Additional details for this callback.
onColumnHeaderDoubleClickfunc
Callback fired when a double click event comes from a column header element.

Signature:
function(params: GridColumnHeaderParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnHeaderParams.
event: The event object.
details: Additional details for this callback.
onColumnHeaderEnterfunc
Callback fired when a mouse enter event comes from a column header element.

Signature:
function(params: GridColumnHeaderParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnHeaderParams.
event: The event object.
details: Additional details for this callback.
onColumnHeaderLeavefunc
Callback fired when a mouse leave event comes from a column header element.

Signature:
function(params: GridColumnHeaderParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnHeaderParams.
event: The event object.
details: Additional details for this callback.
onColumnHeaderOutfunc
Callback fired when a mouseout event comes from a column header element.

Signature:
function(params: GridColumnHeaderParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnHeaderParams.
event: The event object.
details: Additional details for this callback.
onColumnHeaderOverfunc
Callback fired when a mouseover event comes from a column header element.

Signature:
function(params: GridColumnHeaderParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnHeaderParams.
event: The event object.
details: Additional details for this callback.
onColumnOrderChangefunc
Callback fired when a column is reordered.

Signature:
function(params: GridColumnOrderChangeParams, event: MuiEvent<{}>, details: GridCallbackDetails) => void
params: With all properties from GridColumnOrderChangeParams.
event: The event object.
details: Additional details for this callback.
onColumnResizefunc
Callback fired while a column is being resized.

Signature:
function(params: GridColumnResizeParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnResizeParams.
event: The event object.
details: Additional details for this callback.
onColumnVisibilityChangefunc
Callback fired when a column visibility changes. Only works when no columnVisibilityModel is provided and if we change the visibility of a single column at a time.

Signature:
function(params: GridColumnVisibilityChangeParams, event: MuiEvent<{}>, details: GridCallbackDetails) => void
params: With all properties from GridColumnVisibilityChangeParams.
event: The event object.
details: Additional details for this callback.
onColumnVisibilityModelChangefunc
Callback fired when the column visibility model changes.

Signature:
function(model: GridColumnVisibilityModel, details: GridCallbackDetails) => void
model: The new model.
details: Additional details for this callback.
onColumnWidthChangefunc
Callback fired when the width of a column is changed.

Signature:
function(params: GridColumnResizeParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridColumnResizeParams.
event: The event object.
details: Additional details for this callback.
onDetailPanelExpandedRowIdsChangefunc
Callback fired when the detail panel of a row is opened or closed.

Signature:
function(ids: Array<GridRowId>, details: GridCallbackDetails) => void
ids: The ids of the rows which have the detail panel open.
details: Additional details for this callback.
onEditCellPropsChangefunc
Callback fired when the edit cell value changes.

Signature:
function(params: GridEditCellPropsParams, event: MuiEvent<React.SyntheticEvent>, details: GridCallbackDetails) => void
params: With all properties from GridEditCellPropsParams.
event: The event that caused this prop to be called.
details: Additional details for this callback.
onEditRowsModelChangefunc
Callback fired when the editRowsModel changes.

Signature:
function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) => void
editRowsModel: With all properties from GridEditRowsModel.
details: Additional details for this callback.
onErrorfunc
Callback fired when an exception is thrown in the grid.

Signature:
function(args: any, event: MuiEvent<{}>, details: GridCallbackDetails) => void
args: The arguments passed to the showError call.
event: The event object.
details: Additional details for this callback.
onFilterModelChangefunc
Callback fired when the Filter model changes before the filters are applied.

Signature:
function(model: GridFilterModel, details: GridCallbackDetails) => void
model: With all properties from GridFilterModel.
details: Additional details for this callback.
onPageChangefunc
Callback fired when the current page has changed.

Signature:
function(page: number, details: GridCallbackDetails) => void
page: Index of the page displayed on the Grid.
details: Additional details for this callback.
onPageSizeChangefunc
Callback fired when the page size has changed.

Signature:
function(pageSize: number, details: GridCallbackDetails) => void
pageSize: Size of the page displayed on the Grid.
details: Additional details for this callback.
onPinnedColumnsChangefunc
Callback fired when the pinned columns have changed.

Signature:
function(pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) => void
pinnedColumns: The changed pinned columns.
details: Additional details for this callback.
onPreferencePanelClosefunc
Callback fired when the preferences panel is closed.

Signature:
function(params: GridPreferencePanelParams, event: MuiEvent<{}>, details: GridCallbackDetails) => void
params: With all properties from GridPreferencePanelParams.
event: The event object.
details: Additional details for this callback.
onPreferencePanelOpenfunc
Callback fired when the preferences panel is opened.

Signature:
function(params: GridPreferencePanelParams, event: MuiEvent<{}>, details: GridCallbackDetails) => void
params: With all properties from GridPreferencePanelParams.
event: The event object.
details: Additional details for this callback.
onProcessRowUpdateErrorfunc
Callback called when processRowUpdate throws an error or rejects.

Signature:
function(error: any) => void
error: The error thrown.
onResizefunc
Callback fired when the grid is resized.

Signature:
function(containerSize: ElementSize, event: MuiEvent<{}>, details: GridCallbackDetails) => void
containerSize: With all properties from ElementSize.
event: The event object.
details: Additional details for this callback.
onRowClickfunc
Callback fired when a row is clicked. Not called if the target clicked is an interactive element added by the built-in columns.

Signature:
function(params: GridRowParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from GridRowParams.
event: The event object.
details: Additional details for this callback.
onRowDoubleClickfunc
Callback fired when a double click event comes from a row container element.

Signature:
function(params: GridRowParams, event: MuiEvent<React.MouseEvent>, details: GridCallbackDetails) => void
params: With all properties from RowParams.
event: The event object.
details: Additional details for this callback.
onRowEditCommitfunc
Callback fired when the row changes are committed.

Signature:
function(id: GridRowId, event: MuiEvent<MuiBaseEvent>) => void
id: The row id.
event: The event that caused this prop to be called.
onRowEditStartfunc
Callback fired when the row turns to edit mode.

Signature:
function(params: GridRowParams, event: MuiEvent<React.KeyboardEvent | React.MouseEvent>) => void
params: With all properties from GridRowParams.
event: The event that caused this prop to be called.
onRowEditStopfunc
Callback fired when the row turns to view mode.

Signature:
function(params: GridRowParams, event: MuiEvent<MuiBaseEvent>) => void
params: With all properties from GridRowParams.
event: The event that caused this prop to be called.
onRowGroupingModelChangefunc
Callback fired when the row grouping model changes.

Signature:
function(model: GridRowGroupingModel, details: GridCallbackDetails) => void
model: Columns used as grouping criteria.
details: Additional details for this callback.
onRowModesModelChangefunc
Callback fired when the rowModesModel prop changes.

Signature:
function(rowModesModel: GridRowModesModel, details: GridCallbackDetails) => void
rowModesModel: Object containig which rows are in "edit" mode.
details: Additional details for this callback.
onRowOrderChangefunc
Callback fired when a row is being reordered.

Signature:
function(params: GridRowOrderChangeParams, event: MuiEvent<{}>, details: GridCallbackDetails) => void
params: With all properties from GridRowOrderChangeParams.
event: The event object.
details: Additional details for this callback.
onRowsScrollEndfunc
Callback fired when scrolling to the bottom of the grid viewport.

Signature:
function(params: GridRowScrollEndParams, event: MuiEvent<{}>, details: GridCallbackDetails) => void
params: With all properties from GridRowScrollEndParams.
event: The event object.
details: Additional details for this callback.
onSelectionModelChangefunc
Callback fired when the selection state of one or multiple rows changes.

Signature:
function(selectionModel: GridSelectionModel, details: GridCallbackDetails) => void
selectionModel: With all the row ids GridSelectionModel.
details: Additional details for this callback.
onSortModelChangefunc
Callback fired when the sort model changes before a column is sorted.

Signature:
function(model: GridSortModel, details: GridCallbackDetails) => void
model: With all properties from GridSortModel.
details: Additional details for this callback.
onStateChangefunc
Callback fired when the state of the grid is updated.

Signature:
function(state: GridState, event: MuiEvent<{}>, details: GridCallbackDetails) => void
state: The new state.
event: The event object.
details: Additional details for this callback.
pagenumber0
The zero-based index of the current page.
pageSizenumber100
Set the number of rows in one page. If some of the rows have children (for instance in the tree data), this number represents the amount of top level rows wanted on each page.
paginationboolfalse
If true, pagination is enabled.
paginationMode'client'
| 'server'
"client"
Pagination can be processed on the server or client-side. Set it to 'client' if you would like to handle the pagination on the client-side. Set it to 'server' if you would like to handle the pagination on the server-side.
pinnedColumns{ left?: Array<string>, right?: Array<string> }
The column fields to display pinned to left or right.
processRowUpdatefunc
Callback called before updating a row with new values in the row and cell editing. Only applied if props.experimentalFeatures.newEditingApi: true.

Signature:
function(newRow: R, oldRow: R) => Promise<R> | R
newRow: Row object with the new values.
oldRow: Row object with the old values.
returns (Promise | R): The final values to update the row.
rowBuffernumber3
Number of extra rows to be rendered before/after the visible slice.
rowCountnumber
Set the total number of rows, if it is different from the length of the value rows prop. If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
rowGroupingColumnMode'multiple'
| 'single'
'single'
If single, all column we are grouping by will be represented in the same grouping the same column. If multiple, each column we are grouping by will be represented in its own column.
rowGroupingModelArray<string>
Set the row grouping model of the grid.
rowHeightnumber52
Set the height in pixel of a row in the grid.
rowModesModelobject
Controls the modes of the rows.
rowReorderingboolfalse
If true, the reordering of rows is enabled.
rowSpacingType'border'
| 'margin'
"margin"
Sets the type of space between rows added by getRowSpacing.
rowsPerPageOptionsArray<number>[25, 50, 100]
Select the pageSize dynamically using the component UI.
rowThresholdnumber3
Number of rows from the rowBuffer that can be visible before a new slice is rendered.
scrollbarSizenumber
Override the height/width of the grid inner scrollbar.
scrollEndThresholdnumber80
Set the area in px at the bottom of the grid viewport where onRowsScrollEnd is called.
selectionModelArray<number
| string>
| number
| string
Set the selection model of the grid.
showCellRightBorderboolfalse
If true, the right border of the cells are displayed.
showColumnRightBorderboolfalse
If true, the right border of the column headers are displayed.
sortingMode'client'
| 'server'
"client"
Sorting can be processed on the server or client-side. Set it to 'client' if you would like to handle sorting on the client-side. Set it to 'server' if you would like to handle sorting on the server-side.
sortingOrderArray<'asc'
| 'desc'>
['asc', 'desc', null]
The order of the sorting sequence.
sortModelArray<{ field: string, sort?: 'asc'
| 'desc' }>
Set the sort model of the grid.
sxArray<func
| object
| bool>
| func
| object
The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.
throttleRowsMsnumber0
If positive, the Grid will throttle updates coming from apiRef.current.updateRows and apiRef.current.setRows. It can be useful if you have a high update rate but do not want to do heavy work like filtering / sorting or rendering on each individual update.
treeDataboolfalse
If true, the rows will be gathered in a tree structure according to the getTreeDataPath prop.

The ref is forwarded to the root element.

CSS

Rule nameGlobal classDescription
actionsCell.MuiDataGridPremium-actionsCellStyles applied to the root element of the cell with type="actions"
autoHeight.MuiDataGridPremium-autoHeightStyles applied to the root element if autoHeight={true}.
booleanCell.MuiDataGridPremium-booleanCellStyles applied to the icon of the boolean cell.
cell--editable.MuiDataGridPremium-cell--editableStyles applied to the cell element if the cell is editable.
cell--editing.MuiDataGridPremium-cell--editingStyles applied to the cell element if the cell is in edit mode.
cell--textCenter.MuiDataGridPremium-cell--textCenterStyles applied to the cell element if align="center".
cell--textLeft.MuiDataGridPremium-cell--textLeftStyles applied to the cell element if align="left".
cell--textRight.MuiDataGridPremium-cell--textRightStyles applied to the cell element if align="right".
cell--withRenderer.MuiDataGridPremium-cell--withRendererStyles applied to the cell element if the cell has a custom renderer.
cell.MuiDataGridPremium-cellStyles applied to the cell element.
cellContent.MuiDataGridPremium-cellContentStyles applied to the element that wraps the cell content.
cellCheckbox.MuiDataGridPremium-cellCheckboxStyles applied to the cell checkbox element.
checkboxInput.MuiDataGridPremium-checkboxInputStyles applied to the selection checkbox element.
columnHeader--alignCenter.MuiDataGridPremium-columnHeader--alignCenterStyles applied to the column header if headerAlign="center".
columnHeader--alignLeft.MuiDataGridPremium-columnHeader--alignLeftStyles applied to the column header if headerAlign="left".
columnHeader--alignRight.MuiDataGridPremium-columnHeader--alignRightStyles applied to the column header if headerAlign="right".
columnHeader--dragging.MuiDataGridPremium-columnHeader--draggingStyles applied to the floating column header element when it is dragged.
columnHeader--moving.MuiDataGridPremium-columnHeader--movingStyles applied to the column header if it is being dragged.
columnHeader--numeric.MuiDataGridPremium-columnHeader--numericStyles applied to the column header if the type of the column is number.
columnHeader--sortable.MuiDataGridPremium-columnHeader--sortableStyles applied to the column header if the column is sortable.
columnHeader--sorted.MuiDataGridPremium-columnHeader--sortedStyles applied to the column header if the column is sorted.
columnHeader--filtered.MuiDataGridPremium-columnHeader--filteredStyles applied to the column header if the column has a filter applied to it.
columnHeader.MuiDataGridPremium-columnHeaderStyles applied to the column header element.
columnHeaderCheckbox.MuiDataGridPremium-columnHeaderCheckboxStyles applied to the header checkbox cell element.
columnHeaderDraggableContainer.MuiDataGridPremium-columnHeaderDraggableContainerStyles applied to the column header's draggable container element.
rowReorderCellPlaceholder.MuiDataGridPremium-rowReorderCellPlaceholderStyles applied to the row's draggable placeholder element inside the special row reorder cell.
columnHeaderDropZone.MuiDataGridPremium-columnHeaderDropZoneStyles applied to the column headers wrapper if a column is being dragged.
columnHeaderTitle.MuiDataGridPremium-columnHeaderTitleStyles applied to the column header's title element;
columnHeaderTitleContainer.MuiDataGridPremium-columnHeaderTitleContainerStyles applied to the column header's title container element.
columnHeaderTitleContainerContent.MuiDataGridPremium-columnHeaderTitleContainerContentStyles applied to the column header's title excepted buttons.
columnHeaders.MuiDataGridPremium-columnHeadersStyles applied to the column headers.
columnHeadersInner.MuiDataGridPremium-columnHeadersInnerStyles applied to the column headers's inner element.
columnHeadersInner--scrollable.MuiDataGridPremium-columnHeadersInner--scrollableStyles applied to the column headers's inner element if there is a horizontal scrollbar.
columnSeparator--resizable.MuiDataGridPremium-columnSeparator--resizableStyles applied to the column header separator if the column is resizable.
columnSeparator--resizing.MuiDataGridPremium-columnSeparator--resizingStyles applied to the column header separator if the column is being resized.
columnSeparator--sideLeft.MuiDataGridPremium-columnSeparator--sideLeftStyles applied to the column header separator if the side is "left".
columnSeparator--sideRight.MuiDataGridPremium-columnSeparator--sideRightStyles applied to the column header separator if the side is "right".
columnSeparator.MuiDataGridPremium-columnSeparatorStyles applied to the column header separator element.
columnsPanel.MuiDataGridPremium-columnsPanelStyles applied to the columns panel element.
columnsPanelRow.MuiDataGridPremium-columnsPanelRowStyles applied to the columns panel row element.
detailPanel.MuiDataGridPremium-detailPanelStyles applied to the detail panel element.
detailPanels.MuiDataGridPremium-detailPanelsStyles applied to the detail panels wrapper element.
detailPanelToggleCell.MuiDataGridPremium-detailPanelToggleCellStyles applied to the detail panel toggle cell element.
detailPanelToggleCell--expanded.MuiDataGridPremium-detailPanelToggleCell--expandedStyles applied to the detail panel toggle cell element if expanded.
panel.MuiDataGridPremium-panelStyles applied to the panel element.
panelHeader.MuiDataGridPremium-panelHeaderStyles applied to the panel header element.
panelWrapper.MuiDataGridPremium-panelWrapperStyles applied to the panel wrapper element.
panelContent.MuiDataGridPremium-panelContentStyles applied to the panel content element.
panelFooter.MuiDataGridPremium-panelFooterStyles applied to the panel footer element.
paper.MuiDataGridPremium-paperStyles applied to the paper element.
editBooleanCell.MuiDataGridPremium-editBooleanCellStyles applied to root of the boolean edit component.
filterForm.MuiDataGridPremium-filterFormStyles applied to the root of the filter form component.
filterFormDeleteIcon.MuiDataGridPremium-filterFormDeleteIconStyles applied to the delete icon of the filter form component.
filterFormLinkOperatorInput.MuiDataGridPremium-filterFormLinkOperatorInputStyles applied to the link operator inout of the filter form component.
filterFormColumnInput.MuiDataGridPremium-filterFormColumnInputStyles applied to the column input of the filter form component.
filterFormOperatorInput.MuiDataGridPremium-filterFormOperatorInputStyles applied to the operator input of the filter form component.
filterFormValueInput.MuiDataGridPremium-filterFormValueInputStyles applied to the value input of the filter form component.
editInputCell.MuiDataGridPremium-editInputCellStyles applied to the root of the input component.
filterIcon.MuiDataGridPremium-filterIconStyles applied to the filter icon element.
footerContainer.MuiDataGridPremium-footerContainerStyles applied to the footer container element.
iconButtonContainer.MuiDataGridPremium-iconButtonContainerStyles applied to the column header icon's container.
iconSeparator.MuiDataGridPremium-iconSeparatorStyles applied to the column header separator icon element.
main.MuiDataGridPremium-mainStyles applied to the main container element.
menu.MuiDataGridPremium-menuStyles applied to the menu element.
menuIcon.MuiDataGridPremium-menuIconStyles applied to the menu icon element.
menuIconButton.MuiDataGridPremium-menuIconButtonStyles applied to the menu icon button element.
menuOpen.MuiDataGridPremium-menuOpenStyles applied to the menu icon element if the menu is open.
menuList.MuiDataGridPremium-menuListStyles applied to the menu list element.
overlay.MuiDataGridPremium-overlayStyles applied to the overlay element.
virtualScroller.MuiDataGridPremium-virtualScrollerStyles applied to the virtualization container.
virtualScrollerContent.MuiDataGridPremium-virtualScrollerContentStyles applied to the virtualization content.
virtualScrollerContent--overflowed.MuiDataGridPremium-virtualScrollerContent--overflowedStyles applied to the virtualization content when its height is bigger than the virtualization container.
virtualScrollerRenderZone.MuiDataGridPremium-virtualScrollerRenderZoneStyles applied to the virtualization render zone.
pinnedColumns.MuiDataGridPremium-pinnedColumnsStyles applied to the pinned columns.
pinnedColumns--left.MuiDataGridPremium-pinnedColumns--leftStyles applied to the left pinned columns.
pinnedColumns--right.MuiDataGridPremium-pinnedColumns--rightStyles applied to the right pinned columns.
pinnedColumnHeaders.MuiDataGridPremium-pinnedColumnHeadersStyles applied to the pinned column headers.
pinnedColumnHeaders--left.MuiDataGridPremium-pinnedColumnHeaders--leftStyles applied to the left pinned column headers.
pinnedColumnHeaders--right.MuiDataGridPremium-pinnedColumnHeaders--rightStyles applied to the right pinned column headers.
root.MuiDataGridPremium-rootStyles applied to the root element.
root--densityStandard.MuiDataGridPremium-root--densityStandardStyles applied to the root element if density is "standard" (default).
root--densityComfortable.MuiDataGridPremium-root--densityComfortableStyles applied to the root element if density is "comfortable".
root--densityCompact.MuiDataGridPremium-root--densityCompactStyles applied to the root element if density is "compact".
row--editable.MuiDataGridPremium-row--editableStyles applied to the row element if the row is editable.
row--editing.MuiDataGridPremium-row--editingStyles applied to the row element if the row is in edit mode.
row--dragging.MuiDataGridPremium-row--draggingStyles applied to the floating special row reorder cell element when it is dragged.
row--lastVisible.MuiDataGridPremium-row--lastVisibleStyles applied to the last visible row element on every page of the grid.
row.MuiDataGridPremium-rowStyles applied to the row element.
rowCount.MuiDataGridPremium-rowCountStyles applied to the footer row count element to show the total number of rows. Only works when pagination is disabled.
rowReorderCellContainer.MuiDataGridPremium-rowReorderCellContainerStyles applied to the row reorder cell container element.
rowReorderCell.MuiDataGridPremium-rowReorderCellStyles applied to the root element of the row reorder cell
rowReorderCell--draggable.MuiDataGridPremium-rowReorderCell--draggableStyles applied to the root element of the row reorder cell when dragging is allowed
scrollArea.MuiDataGridPremium-scrollAreaStyles applied to both scroll area elements.
scrollArea--left.MuiDataGridPremium-scrollArea--leftStyles applied to the left scroll area element.
scrollArea--right.MuiDataGridPremium-scrollArea--rightStyles applied to the right scroll area element.
selectedRowCount.MuiDataGridPremium-selectedRowCountStyles applied to the footer selected row count element.
sortIcon.MuiDataGridPremium-sortIconStyles applied to the sort icon element.
toolbarContainer.MuiDataGridPremium-toolbarContainerStyles applied to the toolbar container element.
toolbarFilterList.MuiDataGridPremium-toolbarFilterListStyles applied to the toolbar filter list element.
withBorder.MuiDataGridPremium-withBorderStyles applied to both the cell and the column header if showColumnRightBorder={true}.
treeDataGroupingCell.MuiDataGridPremium-treeDataGroupingCellStyles applied to the root of the grouping cell of the tree data.
treeDataGroupingCellToggle.MuiDataGridPremium-treeDataGroupingCellToggleStyles applied to the toggle of the grouping cell of the tree data.
groupingCriteriaCell.MuiDataGridPremium-groupingCriteriaCellStyles applied to the root element of the grouping criteria cell
groupingCriteriaCellToggle.MuiDataGridPremium-groupingCriteriaCellToggleStyles applied to the toggle of the grouping criteria cell

You can override the style of the component using one of these customization options:

Demos