Skip to main content
All docs
V25.1
  • TreeListCustomizeCellDisplayTextEventArgs Class

    Contains data for the CustomizeCellDisplayText event.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public 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";
            }
        }
    }
    

    Customize Cell Display Text

    Inheritance

    Object
    DevExpress.Blazor.Internal.GridEventArgsBase
    DevExpress.Blazor.Internal.GridCustomizeCellDisplayTextEventArgsBase
    TreeListCustomizeCellDisplayTextEventArgs
    See Also