Telerik Kendo MVC TextBox多线模式

时间:2016-01-20 16:12:07

标签: razor textbox kendo-asp.net-mvc multiline telerik-mvc

有谁知道要设置什么属性来制作剑道MVC文本框多线?

 @(Html.Kendo().TextBox()
     .Name("txtComments")
     .Value(@Model.Comments)
     .HtmlAttributes(new { style = "width:100%" })
 )

感谢。

2 个答案:

答案 0 :(得分:16)

如果您想要textarea,我建议您这样做:

@Html.TextArea("textarea", "", new { @class="k-textbox", style = "width: 100%;" })

正如他们demo所示。这将使您获得相同的剑道样式,如果这是你想要的。

答案 1 :(得分:1)

如果要与模型一起使用:

@Html.TextAreaFor(x => x.Description, new { @class = "k-textbox", style = "width: 100%;", placeholder = "Notes... Descriptions..." })