Telerik RadTreeView does not support text-wrapping by default. You can, however, use the following approaches to accomplish the task:
- Using ToolTips - you can shorten the text of the nodes (say, display only the first 10 characters) and put the whole text in a tooltip using the ToolTip property of Telerik RadTreeView's nodes, e.g.:
| |
Copy Code |
|
<rad:RadTreeNode runat="server" Text="New York is .." ToolTip="New York is a beautiful city"/> |
- Add line breaks to the text of the TreeNodes:
| |
Copy Code |
|
<rad:RadTreeNode runat="server" Text="Root<br>Node"/> |
To properly align the text you should add the following style to the treeview span tag:
| |
Copy Code |
|
<style> #RadTreeView1 span { display: -moz-inline-block; display:inline-block; } </style> |
If the treeview resides in a naming container, you can get the name of the span tag from the HTML OutPut of the page.
- Using templates:
http://www.telerik.com/DEMOS/ASPNET/TreeView/Examples/Functionality/Templates/DefaultCS.aspx