Skip to main content
All docs
V25.1
  • TreeListXlExportOptions.CustomizeColumn Property

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

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    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:

    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