Skip to main content
All docs
V25.1
  • DxTreeList.TextWrapEnabled Property

    Specifies whether the TreeList wraps words or if it trims extra words and displays an ellipsis.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(true)]
    [Parameter]
    public bool TextWrapEnabled { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true to wrap words; false to trim extra words and display an ellipsis.

    Remarks

    If a value does not fit into a cell as a single line, the cell displays multiple lines of text. Set the TextWrapEnabled property to false to disable word wrap and trim extra words in the following TreeList elements (in other TreeList elements, word wrap is always enabled):

    • Data column headers
    • Footers
    • Data column cells, except for cells in the first visible data column. This column displays expand/collapse buttons and always wraps its content.

    Instead of trimmed characters, the TreeList component displays an ellipsis. Users can hover over the cell to display all the text in a tooltip.

    Word Wrap Disabled

    Run Demo: Auto Fit

    Note

    The TreeList does not display ellipsis characters nor tooltips for cells whose content is defined by a template and the template’s markup includes block-level elements.

    The following code snippet disables text wrapping:

    @inject EmployeeTaskService EmployeeTaskService
    
    <DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId" TextWrapEnabled="false">
        <Columns>
            <DxTreeListDataColumn FieldName="Name" Caption="Task" />
            <DxTreeListDataColumn FieldName="EmployeeName" />
            <DxTreeListDataColumn FieldName="StartDate" />
            <DxTreeListDataColumn FieldName="DueDate" />
        </Columns>
    </DxTreeList>
    
    @code {
        List<EmployeeTask> TreeListData { get; set; }
    
        protected override void OnInitialized() {
            TreeListData = EmployeeTaskService.GenerateData();
        }
    }
    
    See Also