Kendo dropdown width

前端 未结 7 1176
北恋
北恋 2021-02-07 15:07

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(         


        
7条回答
  •  清歌不尽
    2021-02-07 15:39

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

提交回复
热议问题