DxDataColumnBase.Width Property

Specifies a column’s width.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public string Width { get; set; }

Property Value

Type Description
String

A column’s width.

Remarks

The following examples illustrate how to set the width for different column types:

Command column:

<DxDataGrid Data="@forecasts" >
    <DxDataGridCommandColumn Width="150px"></DxDataGridCommandColumn>
    ...
</DxDataGrid>

DxDataGridColumn:

<DxDataGrid Data="@DataSource" >
    ...
    <DxDataGridColumn Field="@nameof(ProductFlat.Id)" Caption="Id" Width="50px">
    </DxDataGridColumn>
</DxDataGrid>

DxDataGridDateEditColumn:

<DxDataGrid Data="@DataSource" >
    ...
    <DxDataGridDateEditColumn Field="@nameof(ProductFlat.LastUpdated)" 
        Caption="Last Updated" 
        Width="350px">
    </DxDataGridDateEditColumn>
</DxDataGrid>

Online Demo

Data Grid - Column Types

See Also