Skip to main content
All docs
V24.2

DxTreeListDataColumn.ExportWidth Property

Specifies the column’s export width in pixels.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Default Description
Int32 200

The column width.

Remarks

When you export data to Excel formats (XLS and XLSX), use the ExportWidth property to specify the width of the column in the exported document.

Note that Microsoft Excel performs width calculation in characters. When you open a document, Excel converts the column width in pixels to characters. The column width in characters differs on a machine with more than 100% DPI - the resulting width in pixels differs from the specified value. You can handle the CustomizeColumn action and specify the Column.WidthInCharacters property to set the column width in characters.

The following example applies the ExportWidth property to the Task column:

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" ExportWidth="300" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

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

See Also