Skip to content

Commit c8eb9fe

Browse files
committed
Sync with Kendo UI Professional
1 parent 13510f4 commit c8eb9fe

File tree

10 files changed

+1426
-829
lines changed

10 files changed

+1426
-829
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#grid-default-editors-section
2+
3+
By default, the Grid component serializes editors allocated within the `~/Views/Shared/EditorTemplates/` folder.
4+
5+
For example, the default editor of the `string` properties is the [TextBox]({% slug htmlhelpers_overview_textbox%}) component, the [CheckBox]({% slug htmlhelpers_checkbox_aspnetcore_overview%})—for booleans, the [DateTimePicker]({% slug htmlhelpers_datetimepicker_aspnetcore%})—for `DateTime` data type properties, and more.
6+
7+
```C# String.cshtml
8+
@model object
9+
10+
@Html.Kendo().TextBoxFor(model => model)
11+
```
12+
```C# Boolean.cshtml
13+
@model bool?
14+
15+
@(Html.Kendo().CheckBoxFor(m => m).HtmlAttributes(new { title = Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("")}))
16+
```
17+
```C# DateTime.cshtml
18+
@model DateTime?
19+
20+
@(Html.Kendo().DateTimePickerFor(m => m).HtmlAttributes(new { title = Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("")}))
21+
```
22+
23+
If no editors are available in the `~/Views/Shared/EditorTemplates/` folder, the Grid will revert to using a default editor based on the primitive type.
24+
25+
#end

0 commit comments

Comments
 (0)