Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListXlExportOptions.CustomizeColumn Property

Allows you to customize an individual column in the exported document.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public Action<TreeListExportCustomizeColumnEventArgs> CustomizeColumn { get; set; }

#Property Value

Type Description
Action<TreeListExportCustomizeColumnEventArgs>

A delegate method that customizes a column.

#Remarks

Implement the CustomizeColumn action delegate to customize an individual column in the exported document: change its width or formatting, or hide the column.

The following code snippet changes the column width in the exported document:

C#
async Task ExportXlsx_Click() {
    await MyTreeList.ExportToXlsxAsync("ExportResult", new TreeListXlExportOptions() {
        CustomizeColumn = CustomizeColumn
    });
}
void CustomizeColumn(TreeListExportCustomizeColumnEventArgs e) {
    if (e.FieldName == "Name")
        e.Column.WidthInPixels = 300;
}
See Also