• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 692
  • Last Modified:

ASP.net TreeView stop or wrap only node text that goes off the page

Hi

In ASP.net 4 I have a TreeView with multiple child nodes as shown in the image. Only a few of the last nodes go off the page. Is ot possible to wrap only these nodes?
Image1.jpg
0
Murray Brown
Asked:
Murray Brown
  • 2
  • 2
1 Solution
 
Gerry BartleySoftware EngineerCommented:
In asp, treeview control has a NodeWrap property. Set to true for wrapping of text. Not sure how much control of the wrapping you will have though
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. Thanks. I should have mentioned that I tried that already and it wrapped every node, which made a mess. Thanks
0
 
Gerry BartleySoftware EngineerCommented:
Try this
Don't know how you're populating your tree, but this should work
Add  html code for page break  <br /> in your datasource column or xml etc for whatever nodes you want to wrap


example
Add a line break wherever you want to wrap a very long title text  <br />   Wraps now
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Great. Thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now