Kendo UI dropdownlist takes size of biggest option
css, javascript, kendo-ui
Solution
.k-dropdown {
max-width:10em !important;
}
Add these to your CSS and it works, the width would be the max-width you want to specify so that the dropdown box is of this max-width, whereas the contents/items would be in a single line.
The !important property forcefully adds the style you would like to have. Also it does override the width calculated by kendo.
Thanks for answering.
Hope this helps ! Raza
Problem
``` var ddlViews = $('#ddlViews').data("kendoDropDownList"); ddlViews.list.width("auto"); ``` I have added width to be auto but its not working, also the width of the dropdown box gets the max width of the item selected and overflows out of the box. I want the dropdown box to have a fixed width, but the dropdown list items should show contents in single line. As the normal dropdown would work.