TreeListCustomizeCellDisplayTextEventArgs Class
In This Article
Contains data for the CustomizeCellDisplayText event.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
C#
public abstract class TreeListCustomizeCellDisplayTextEventArgs :
GridCustomizeCellDisplayTextEventArgsBase
#Remarks
Use TreeListCustomizeCellDisplayTextEventArgs
(Value, FieldName, and so on) to specify the display format and access other TreeList data.
The following example displays Completed
text strings instead of 100
values in the Progress column:
@inject EmployeeTaskService TaskService
<DxTreeList Data="@Data"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
CustomizeCellDisplayText="TreeList_CustomizeCellDisplayText" >
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" Width="40%" />
<DxTreeListDataColumn FieldName="EmployeeName" />
<DxTreeListDataColumn FieldName="StartDate" />
<DxTreeListDataColumn FieldName="DueDate" />
<DxTreeListDataColumn FieldName="Progress" DisplayFormat="{0}%" />
</Columns>
</DxTreeList>
@code {
List<EmployeeTask> Data { get; set; }
protected override void OnInitialized() {
Data = TaskService.GenerateData();
}
void TreeList_CustomizeCellDisplayText(TreeListCustomizeCellDisplayTextEventArgs e) {
if (e.FieldName == "Progress" && (int) e.Value == 100) {
e.DisplayText = "Completed";
}
}
}
#Inheritance
Object
DevExpress.Blazor.Internal.GridEventArgsBase
DevExpress.Blazor.Internal.GridCustomizeCellDisplayTextEventArgsBase
TreeListCustomizeCellDisplayTextEventArgs
See Also