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
[DefaultValue(true)]
[Parameter]
public bool TextWrapEnabled { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
|
#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.
Note
The Tree
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();
}
}