0
MVC ComboBox控件的默认值太大&想要将高度设置得更小。我已经看了各种在线&试图他们无济于事。我想设置高度为30px。他们使用EM,所以我有将其转换为1.90em。设置KendoUI MVC组合框的高度
的事情,我已经尝试过...
- 我已尝试设置
.k-input { height: 1.875em; } .k-select { height: 1.875em; }
- 我试图在MVC控制(本身)设置
.Height(30)
- 我已尝试设置
.HtmlAttributes(new { style = "height: 30px; width:100%;" }))
问:什么是设置高度的正确方法?
样品MVC控制:
@(Html.Kendo().ComboBox()
.Name("ddlDeviceType")
.Filter("contains")
.Placeholder("Select Device Type...")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>() {
new SelectListItem() { Text = "Bristol-3330", Value = "1" },
new SelectListItem() { Text = "Eagle", Value = "2" },
new SelectListItem() { Text = "Flow Automation-Autopilot", Value = "3" },
new SelectListItem() { Text = "ROC-300 FLASHPAC", Value = "4" }
})
.Suggest(true)
.HtmlAttributes(new { style = "width:100%;" }))
这是完美的。如果没关系,当我将它修复到我的“规格”时,我会根据这些规格更新您的答案并将其标记为正确 –
注意:请务必将“行高”更改为某种东西 - 略高于1 –
虽然我非常喜欢KendoUI,Telerik/Progress有时真让我失望!我一直在努力几个小时来设置一个简单的小部件的高度。难以置信的。这家伙值得一杯啤酒。 +1 – Alan