DxDataGrid<T>.ColumnResizeMode Property

Specifies whether and how users can resize Data Grid columns.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll

Declaration

[Parameter]
public DataGridColumnResizeMode ColumnResizeMode { get; set; }

Property Value

Type Description
DataGridColumnResizeMode

A DataGridColumnResizeMode value.

Available values:

Name Description
Disabled

Users cannot resize Data Grid columns.

NextColumn

The width of the column to the right changes, but the Data Grid’s width remains unchanged.

Component

The Data Grid’s width changes, but the width of other columns remains the same.

Remarks

If the ColumnResizeMode property is set to Disabled (the default value), users cannot change the column’s width at runtime.

To enable column resize, set the ColumnResizeMode property to one of the following values:

  • NextColumn - The width of the column to the right changes, but the Data Grid’s width remains unchanged.

    DataGrid Resize Next Column

  • Component - The Data Grid’s width changes, but the width of other columns remains the same.

    DataGrid Resize Component

<DxDataGrid DataAsync="@CustomersService.Load"
            ...
            ColumnResizeMode="DataGridColumnResizeMode.NextColumn">
    @*...*@
</DxDataGrid>

Set the Width property for all Data Grid columns. Columns with unspecified widths might be hidden if the Data Grid does not have sufficient space to display them.

Refer to the following topic for more information: Table Layout Specifics.

Run Demo: Data Grid - Resize Columns

See Also