GridViewColumn.MinWidth Property
Gets or sets the minimum width of the column.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Default | Description |
---|---|---|
Int32 | 0 | The column’s minimum width. |
#Remarks
ASPxGridView allows you to resize columns in the UI or in code if the ASPxGridViewResizingSettings.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 MinWidth
property specifies the minimum width of an individual column. To specify the minimum width for all grid columns, use the ASPxGridViewSettings.ColumnMinWidth property.
Note that the MinWidth
property is in effect if you use the fixed table layout in the grid.
#Concept
#Example
<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" />