Telerik Kendo MVC TextBox Multiline Mode

Cef picture Cef · Jan 20, 2016 · Viewed 23.9k times · Source

Does anyone know what properties to set to make a Kendo MVC Textbox Multiline?

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

Thanks.

Answer

Matt Millican picture Matt Millican · Jan 20, 2016

If you want a textarea, I'd recommend doing it this way:

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

as their demo shows. This will allow you to get the same Kendo styling, if that's what you're going for.