Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 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

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.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

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