Kendo dropdown width

2019-03-19 05:21发布

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"
});

7条回答
何必那么认真
2楼-- · 2019-03-19 05:50

You can try this as well;

<script type="text/javascript">
  $(document).ready(function() {
    var kendoDropDown = $('#div1').data('kendoDropDownList');
    kendoDropDown.list.width(250);
  });
</script>

Further documentation can be found here in Telerik's official API reference.

查看更多
登录 后发表回答