Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telerik Kendo MVC TextBox Multiline Mode

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.

like image 844
Cef Avatar asked Jan 20 '16 16:01

Cef


2 Answers

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.

like image 101
Matt Millican Avatar answered Sep 22 '22 11:09

Matt Millican


If you want to use with a model:

@Html.TextAreaFor(x => x.Description, new { @class = "k-textbox", style = "width: 100%;", placeholder = "Notes... Descriptions..." })
like image 23
suleymanduzgun Avatar answered Sep 22 '22 11:09

suleymanduzgun