Skip to main content
A newer version of this page is available. .
Tab

ASPxGridViewResizingSettings.ColumnResizeMode Property

Specifies how columns are resized when a user changes a column’s width.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(ColumnResizeMode.Disabled)]
public ColumnResizeMode ColumnResizeMode { get; set; }

Property Value

Type Default Description
ColumnResizeMode Disabled

One of the enumeration values.

Available values:

Name Description
Disabled

End-users are not allowed to resize columns.

Control

When a user resizes a column, the control changes its width and does not resize other columns.

ColumnResizing_Control

NextColumn

When a user resizes a column, the control changes the width of its neighbor columns. The control’s width is not changed.

ColumnResizing_NextColumn

Property Paths

You can access this nested property as listed below:

Library Object Type Path to ColumnResizeMode
ASP.NET Controls and MVC Extensions ASPxGridView
.SettingsResizing .ColumnResizeMode
GridViewProperties
.SettingsResizing .ColumnResizeMode
GridViewSettings
.SettingsResizing .ColumnResizeMode
GridViewSettings<RowType>
.SettingsResizing .ColumnResizeMode
MVCxGridView
.SettingsResizing .ColumnResizeMode
MVCxGridViewProperties
.SettingsResizing .ColumnResizeMode
ASP.NET Bootstrap Controls BootstrapGridView
.SettingsResizing .ColumnResizeMode

Remarks

Users can drag the edges of the column headers to resize columns.

ASPxGridView_ColumnResizing

Run Demo: ASPxGridView - Resize columns Run Demo: MVCxGridView - Resize Columns

The ColumnResizeMode property specifies ASPxGridView control behavior when users resize a column.

Note that the grid requires at least one non-fixed column to resize columns. If all grid columns have fixed widths (in pixels), the most right column’s width becomes relative.

Concept

Resize Columns

Example

Web Forms:

<dx:ASPxGridView ID="grid" runat="server" DataSourceID="CustomersDataSource" KeyFieldName="CustomerID" Width="600">
    <Columns>
        ...
    </Columns>
    <SettingsResizing ColumnResizeMode="NextColumn" />
</dx:ASPxGridView>
grid.SettingsResizing.ColumnResizeMode = ColumnResizeMode.NextColumn;

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "grid";
    settings.SettingsResizing.ColumnResizeMode = ColumnResizeMode.NextColumn;
    ...
}).Bind(Model).GetHtml()
See Also