The default Kendo Grid's behavior is to display a text box for string editing. How do you change this to a textarea?
I am trying to use a EditorTemplate but cannot retrieve or pass the model's string values if I use Html.TextArea
1 Answer, 1 is accepted
0
Accepted
Tsvetina
Telerik team
answered on 17 Jan 2019, 12:57 PM
Hi Vince,
Indeed, using a custom editor is the way to go in this scenario. You can use the Html.TextAreaFor helper to be able to bind the textarea to the edited field:
[UIHint("TextArea")]
public string ContactName
{
get;
set;
}
Views/Shared/EditorTemplates/TextArea.cshtml
@model string
@Html.TextAreaFor(m=>m, new { rows = 3})
Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.