Hi can someone tell me how to set width for kendo dropdown? Here is my code sample and it is not working. Anything wrong in that?
$("#div1").kendoDropDownList({
dataSource: items,
dataTextField: "Name",
dataValueField: "Id",
Width : "250px"
});
$("#div1"). kendoDropDownList({ dataSource: items, dataTextField: "Name", dataValueField: "Id", Width : "250px" }); kendo-ui.
k-list-container and . k-list-scroller ) to Dropdownlist using JavaScript. And make the height of ". k-list-scroller" dynamic i.e. the drop down list-area when selected, the height of it, should go beyond screen height or window height.
If MVC Razor DropDownList HTML helper/wrapper syntax is applied, then you can use method HtmlAttributes to specify the width of dropdown list like:
@(Html.Kendo().DropDownList() .Name("myDDL")
.HtmlAttributes(new { style="width:100px" })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With