Treeview has scrollbars and gray line when text is too long

1 Answer 11 Views
DropDownTree
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Lee asked on 22 Mar 2024, 02:44 PM

I have a DropDownTree on my site. When the text of the item is too long to fit I am seeing a horizontal scrollbar and the gray colored background does not expand. I don't want auto width as that makes the container grow larger than the input control is. How can I instead have it wrap? 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 27 Mar 2024, 09:05 AM

Hi Lee,

You can try applying the white-space CSS property to the '.k-treeview-leaf-text' elements as demonstrated in the Dojo linked here - https://dojo.telerik.com/@NeliK/okavelox

<style>
    .k-treeview-leaf-text{
      white-space: pre-wrap;
    }
  </style>

I hope this helps.

Regards,
Neli
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
DropDownTree
Asked by
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Answers by
Neli
Telerik team
Share this question
or