Skip to main content
All docs
V25.1
  • TreeListExportCustomizeCellEventArgs.ColumnFieldName Property

    Returns the name of the data source field bound to the column that contains the processed cell.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public string ColumnFieldName { get; set; }

    Property Value

    Type Description
    String

    The field name.

    Remarks

    The CustomizeCell action allows you to customize a cell in the exported file. Use the ColumnFieldName property to determine the column that contains the processed cell.

    The following example adds a hyperlink to the document’s Name column:

    async Task ExportXlsx_Click() {
        await MyTreeList.ExportToXlsxAsync("ExportResult", new TreeListXlExportOptions() {
            CustomizeCell = CustomizeCell
        });
    }
    void CustomizeCell(TreeListExportCustomizeCellEventArgs e) {
        if (e.AreaType == DevExpress.Export.SheetAreaType.DataArea && e.ColumnFieldName == "Name") {
            var product = e.DataItem as TestModel;
            e.Hyperlink = product.Url;
            e.Handled = true;
        }
    };
    
    See Also