Telerik Kendo MVC 文本框多行模式
Telerik Kendo MVC TextBox Multiline Mode
有谁知道要设置什么属性来制作 Kendo MVC 文本框多行?
@(Html.Kendo().TextBox()
.Name("txtComments")
.Value(@Model.Comments)
.HtmlAttributes(new { style = "width:100%" })
)
谢谢。
如果您想要 textarea
,我建议您这样做:
@Html.TextArea("textarea", "", new { @class="k-textbox", style = "width: 100%;" })
如他们的 demo 所示。这将允许您获得相同的 Kendo 样式,如果这是您想要的。
如果要与模型一起使用:
@Html.TextAreaFor(x => x.Description, new { @class = "k-textbox", style = "width: 100%;", placeholder = "Notes... Descriptions..." })
有谁知道要设置什么属性来制作 Kendo MVC 文本框多行?
@(Html.Kendo().TextBox()
.Name("txtComments")
.Value(@Model.Comments)
.HtmlAttributes(new { style = "width:100%" })
)
谢谢。
如果您想要 textarea
,我建议您这样做:
@Html.TextArea("textarea", "", new { @class="k-textbox", style = "width: 100%;" })
如他们的 demo 所示。这将允许您获得相同的 Kendo 样式,如果这是您想要的。
如果要与模型一起使用:
@Html.TextAreaFor(x => x.Description, new { @class = "k-textbox", style = "width: 100%;", placeholder = "Notes... Descriptions..." })