Skip to main content

GridViewColumn.MaxWidth Property

Gets or sets the maximum width of the column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll


public virtual int MaxWidth { get; set; }

Property Value

Type Default Description


The column’s maximum width.


ASPxGridView allows you to resize columns in the UI or in code if the ASPxGridViewBehaviorSettings.ColumnResizeMode property is set to Control or NextColumn. To resize columns programmatically, use the Width property. You can also specify the MinWidth and MaxWidth properties to specify a range of acceptable width values for the column.

The MaxWidth property specifies the maximum width of an individual column. To specify the maximum width for all grid columns, use the ASPxGridViewSettings.ColumnMaxWidth property.

Note that the MaxWidth property is in effect if you use the fixed table layout in the grid.

Run Demo: Grid Columns - Resizing Columns

Run Demo: Responsive Layout



<dx:GridViewCommandColumn ShowEditButton="true" Width="50px" />
<dx:GridViewDataTextColumn FieldName="OrderID" Caption="ID" Width="30px" />
<dx:GridViewDataTextColumn FieldName="ProductName" Width="35%" MinWidth="135" />
<dx:GridViewDataTextColumn FieldName="Price" Width="20%" MaxWidth="70" MinWidth="45" />
<dx:GridViewDataTextColumn FieldName="Quantity" Width="20%" MaxWidth="70" MinWidth="62" />
<dx:GridViewDataTextColumn FieldName="Total" Width="25%" MaxWidth="70" MinWidth="50" />
<dx:GridViewCommandColumn ShowDeleteButton="true" Width="50px" />


See Also