Skip to main content

DxGridDataColumn.ExportWidth Property

Specifies the column’s export width.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(200)]
[Parameter]
public int ExportWidth { get; set; }

Property Value

Type Default Description
Int32 200

The column’s width, in pixels.

Remarks

The grid allows you to export data to XLS, XLSX, and CSV formats. When exporting to Excel formats, use the ExportWidth property to specify the width of the column in the exported document.

<DxGrid @ref="Grid" Data="@Data" >
    <Columns>
        <DxGridDataColumn FieldName="ContactName" ExportWidth="300"/>
        <DxGridDataColumn FieldName="ContactTitle" ExportWidth="150"/>
        <DxGridDataColumn FieldName="CompanyName" />
        <DxGridDataColumn FieldName="Country" />
    </Columns>
</DxGrid>

<OptionButton Text="Export to XLSX" OnClick="ExportXlsx_Click" />

@code {
    IEnumerable<object> Data { get; set; }
    IGrid Grid { get; set; }
    protected override async Task OnInitializedAsync() {
        Data = await NwindDataService.GetCustomersAsync();
    }
}

For more information about data export in the Grid component, refer to the following topic: Export Data in Blazor Grid.

Implements

See Also