TreeListXlExportOptions.CustomizeColumn Property
In This Article
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<Tree |
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