We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to prevent text wrp in Dropdown popup when the text content exceeds the popup width

Platform: JavaScript |
Control: ejDropDownList |
Published Date: November 3, 2017 |
Last Revised Date: November 3, 2017


When DropDownList is set with a PopupWidth and if the text value is longer than the given width, then the text will be wrapped inside the popup element. To prevent DropDownList items text wrapping and get horizontal scroller in popup element, you can set the CSS style “white-space” value as “no-wrap” for the DropDownList items.


Define a DropDownList control and bind create event for it. In the create event handler, get the DropDownList object and set the CSS “white-space” as “no-wrap” for all list elements inside the DropDownList. This will prevent the text wrap of DropDownList items. To get the horiziontal Scroller for the popup, set the popup list wrapped width for the Scroller object and refresh() the Scroller. Refer the following code block,



Output DropDownList items without text wrap,

Figure 1: Popup element with a horizontal Scroller

You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon