interface GridGroupingColDefOverride<R> {
    align?: GridAlignment;
    cellClassName?: GridCellClassNamePropType<R, any>;
    colSpan?: number | GridColSpanFn<R, any, any>;
    description?: string;
    disableColumnMenu?: boolean;
    disableExport?: boolean;
    disableReorder?: boolean;
    display?: "flex" | "text";
    filterable?: boolean;
    filterOperators?: readonly GridFilterOperator<R, any, any>[];
    flex?: number;
    getApplyQuickFilterFn?: GetApplyQuickFilterFn<R, any>;
    getSortComparator?: ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<any>) | ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<any>) | ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<any>);
    headerAlign?: GridAlignment;
    headerClassName?: GridColumnHeaderClassNamePropType;
    headerName?: string;
    hideable?: boolean;
    hideDescendantCount?: boolean;
    hideSortIcons?: boolean;
    leafField?: string;
    mainGroupingCriteria?: string;
    maxWidth?: number;
    minWidth?: number;
    pinnable?: boolean;
    renderCell?: ((params: GridRenderCellParams<R, any, any, GridTreeNodeWithRender>) => ReactNode) | ((params: GridRenderCellParams<R, any, any, GridTreeNodeWithRender>) => ReactNode) | ((params: GridRenderCellParams<R, any, any, GridTreeNodeWithRender>) => ReactNode);
    renderHeader?: ((params: GridColumnHeaderParams<R, any, any>) => ReactNode) | ((params: GridColumnHeaderParams<R, any, any>) => ReactNode) | ((params: GridColumnHeaderParams<R, any, any>) => ReactNode);
    renderHeaderFilter?: ((params: GridRenderHeaderFilterProps) => ReactNode);
    resizable?: boolean;
    rowSpanValueGetter?: GridValueGetter<R, any, any, never>;
    sortable?: boolean;
    sortComparator?: GridComparatorFn<any>;
    sortingOrder?: readonly GridSortDirection[];
    valueFormatter?: GridValueFormatter<R, any, any, never>;
    valueGetter?: GridValueGetter<R, any, any, never>;
    valueParser?: GridValueParser<R, any, any>;
    width?: number;
}

Type Parameters

Hierarchy

  • Omit<GridColDef<R>,
        | "editable"
        | "valueSetter"
        | "field"
        | "type"
        | "preProcessEditCellProps"
        | "renderEditCell"
        | "groupable">
    • GridGroupingColDefOverride

Properties

Align cell content.

cellClassName?: GridCellClassNamePropType<R, any>

Class name added to cells in this column.

colSpan?: number | GridColSpanFn<R, any, any>

Number of columns a cell should span.

1
description?: string

The tooltip text shown when the column header name is truncated.

disableColumnMenu?: boolean

If true, the column menu is disabled for this column.

false
disableExport?: boolean

If true, this column will not be included in exports.

false
disableReorder?: boolean

If true, this column cannot be reordered.

false
display?: "flex" | "text"

Display mode for the cell:

  • 'text': For text-based cells (default)
  • 'flex': For cells with HTMLElement children
filterable?: boolean

If true, the column is filterable.

true
filterOperators?: readonly GridFilterOperator<R, any, any>[]

Allows setting the filter operators for this column.

flex?: number

The flex grow factor of the column. Must be a positive number.

getApplyQuickFilterFn?: GetApplyQuickFilterFn<R, any>

The callback that generates a filtering function for a given quick filter value. This function can return null to skip filtering for this value and column.

The value with which we want to filter the column.

The column from which we want to filter the rows.

Deprecated: The API of the grid.

The function to call to check if a row pass this filter value or not.

getSortComparator?: ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<any>) | ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<any>) | ((sortDirection: GridSortDirection) => undefined | GridComparatorFn<any>)

Provide an alternative comparator function for sorting. Takes precedence over sortComparator.

The direction of the sort.

The comparator function to use.

headerAlign?: GridAlignment

Align column header content.

Class name added to the column header cell.

headerName?: string

The title displayed in the column header cell.

hideable?: boolean

If false, removes the option to hide this column.

true
hideDescendantCount?: boolean

If true, the grouping cells will not render the amount of descendants.

false
hideSortIcons?: boolean

Toggle the visibility of the sort icons.

false
leafField?: string

The field from which we want to render the leaves of the tree. Do not have any effect when building the tree with the props.treeData feature.

mainGroupingCriteria?: string

The field from which we want to apply the sorting and the filtering for the grouping column. It is only useful when props.rowGroupingColumnMode === "multiple" to decide which grouping criteria should be used for sorting and filtering. Do not have any effect when building the tree with the props.treeData feature.

The sorting and filtering is applied based on the leaf field in any, otherwise based on top level grouping criteria.
maxWidth?: number

The maximum width of the column in pixels.

Infinity
minWidth?: number

The minimum width of the column in pixels.

50
pinnable?: boolean

If false, the menu items for column pinning menu will not be rendered. Only available in DataGridPro. TODO: Use module augmentation to move it to @mui/x-data-grid-pro (need to modify how we handle column types default values).

true
renderCell?: ((params: GridRenderCellParams<R, any, any, GridTreeNodeWithRender>) => ReactNode) | ((params: GridRenderCellParams<R, any, any, GridTreeNodeWithRender>) => ReactNode) | ((params: GridRenderCellParams<R, any, any, GridTreeNodeWithRender>) => ReactNode)

Override the component rendered as cell for this column.

V, F

Object containing parameters for the renderer.

The element to be rendered.

renderHeader?: ((params: GridColumnHeaderParams<R, any, any>) => ReactNode) | ((params: GridColumnHeaderParams<R, any, any>) => ReactNode) | ((params: GridColumnHeaderParams<R, any, any>) => ReactNode)

Override the component rendered in the column header cell.

V, F

Object containing parameters for the renderer.

The element to be rendered.

renderHeaderFilter?: ((params: GridRenderHeaderFilterProps) => ReactNode)

Allows to render a component in the column header filter cell.

Type declaration

    • (params): ReactNode
    • Parameters

      Returns ReactNode

      The element to be rendered.

resizable?: boolean

If false, disables resizing for this column.

true
rowSpanValueGetter?: GridValueGetter<R, any, any, never>

Function that returns a specific value to be used in row spanning.

sortable?: boolean

If false, disables sorting for this column.

true
sortComparator?: GridComparatorFn<any>

A comparator function used to sort rows.

sortingOrder?: readonly GridSortDirection[]

The order of the sorting sequence.

valueFormatter?: GridValueFormatter<R, any, any, never>

Formats the cell value before rendering.

valueGetter?: GridValueGetter<R, any, any, never>

Function that returns specific data to render in the cell instead of using the field value.

valueParser?: GridValueParser<R, any, any>

Function that takes the user-entered value and converts it to a value used internally.

The converted value to use internally.

width?: number

The width of the column in pixels.

100