DxTreeList.GetTotalSummaryDisplayText(ITreeListSummaryItem) Method
Gets a total summary item’s display text.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public string GetTotalSummaryDisplayText(
ITreeListSummaryItem item
)
Parameters
Name | Type | Description |
---|---|---|
item | ITreeListSummaryItem | The total summary item. |
Returns
Type | Description |
---|---|
String | The total summary item’s display text. |
Remarks
Specify the DisplayText property or handle the CustomizeSummaryDisplayText event to customize the summary display text.
The following code snippet customizes the Progress column’s footer. The footer contains the summary’s display text that is formatted in italics.
@inject EmployeeTaskService EmployeeTaskService
<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" />
<DxTreeListDataColumn FieldName="EmployeeName" />
<DxTreeListDataColumn FieldName="StartDate" />
<DxTreeListDataColumn FieldName="DueDate" />
<DxTreeListDataColumn FieldName="Status" Caption="Progress" DisplayFormat="p0" >
<FooterTemplate>
@{
var summaryItems = context.TreeList.GetTotalSummaryItems();
if (summaryItems.Any()) {
foreach (var i in summaryItems) {
<i>@context.TreeList.GetTotalSummaryDisplayText(i)</i>
}
}
}
</FooterTemplate>
</DxTreeListDataColumn>
</Columns>
<TotalSummary>
<DxTreeListSummaryItem FieldName="Status" SummaryType="TreeListSummaryItemType.Avg" />
</TotalSummary>
</DxTreeList>
@code {
List<EmployeeTask> TreeListData { get; set; }
protected override void OnInitialized() {
TreeListData = EmployeeTaskService.GenerateData();
}
}
For more information about summaries in the TreeList component, refer to the following topic: Summary in Blazor TreeList.
See Also