Skip to main content
All docs
V26.1
  • DxGridColumn.MinWidth Property

    Specifies a column’s minimum width in pixels.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.Grid.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(50)]
    [Parameter]
    public int MinWidth { get; set; }

    Property Value

    Type Default Description
    Int32 50

    A column’s minimum width in pixels.

    Remarks

    If you do not specify a column’s Width property explicitly, its value is automatically calculated based on the Grid’s total width, other column widths, borders, and cell spacing. For additional information on how this algorithm works in different scenarios, refer to the following topic: Layout Specifics in Blazor Grid.

    If there is not enough space to display all Grid columns, columns with unspecified widths can be collapsed. To prevent a column from collapsing, set its MinWidth property to a non-zero value.

    <DxGrid Data="@Data"
                CssClass="my-class">
            <Columns>
                <DxGridDataColumn FieldName="Date" DisplayFormat="D" Width="200"/>
                <DxGridDataColumn FieldName="Forecast" Width="150" />
                <DxGridDataColumn FieldName="CloudCover" Width="150"/>
                <DxGridDataColumn FieldName="TemperatureC" Caption="@("Temp. (\x2103)")" MinWidth="80"/>
            </Columns>
    </DxGrid>
    
    @code {
        object Data { get; set; }
    
        protected override void OnInitialized() {
            Data = ForecastService.GetForecast().ToList();
        }
    }
    

    Grid Layout Specifics - Minimum Width is Set to Zero

    Implements

    See Also