Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    TreeListCustomizeCellDisplayTextEventArgs Class

    Contains data for the CustomizeCellDisplayText event.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    #Declaration

    C#
    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