TreeListExportCustomizeCellEventArgs.SummaryItem Property
Returns information on the summary calculated in the current cell.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public ExportSummaryItem SummaryItem { get; set; }
Property Value
| Type | Description |
|---|---|
| ExportSummaryItem | An object that contains information on the summary item or |
Remarks
The CustomizeCell action allows you to customize a cell in the exported file. You can use the AreaType property to determine where the processed cell is situated.
When the AreaType is set to TotalFooter, use the SummaryItem property to get information about a summary item contained in the cell.
If the current cell does not belong to a footer row, the SummaryItem property returns null.
@using DevExpress.Export
<DxButton Text="Export to XLSX" Click="ExportXlsx_Click" />
<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId" @ref="MyTreeList">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" />
<DxTreeListDataColumn FieldName="EmployeeName" />
<DxTreeListDataColumn FieldName="StartDate" />
<DxTreeListDataColumn FieldName="DueDate" />
</Columns>
<TotalSummary>
<DxTreeListSummaryItem FieldName="Name" SummaryType="TreeListSummaryItemType.Count" />
<DxTreeListSummaryItem FieldName="DueDate" SummaryType="TreeListSummaryItemType.Min" />
</TotalSummary>
</DxTreeList>
@code {
ITreeList MyTreeList { get; set; }
async Task ExportXlsx_Click() {
await MyTreeList.ExportToXlsxAsync("ExportResult", new TreeListXlExportOptions() {
CustomizeCell = OnCustomizeCell
});
}
void OnCustomizeCell(TreeListExportCustomizeCellEventArgs args) {
if (args.AreaType == SheetAreaType.TotalFooter && args.SummaryItem.FieldName == "Name") {
args.Formatting.BackColor = System.Drawing.Color.Beige;
args.Handled = true;
}
}
}
See Also