Skip to content

Commit 0fc8a84

Browse files
committed
Add container info
1 parent 5de6ced commit 0fc8a84

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

aspnet-mvc/helpers/listview/editing.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ description: Find which steps to follow in order to configure Kendo UI ListView
1111
To configure Kendo ListView for ASP.NET MVC for editing follow these steps:
1212

1313
1. Define item template for listview:
14-
14+
1515
<!-- The following markup contains the `Add new record` button -->
1616
<div class="k-toolbar k-grid-toolbar">
1717
<a class="k-button k-button-icontext k-add-button" href="#"><span class="k-icon k-add"></span>Add new record</a>
1818
</div>
19-
19+
2020
<!-- ListView item template -->
2121
<script id="list-view-template" type="text/x-kendo-template">
2222
<div class="product-view">
@@ -36,12 +36,12 @@ To configure Kendo ListView for ASP.NET MVC for editing follow these steps:
3636
</div>
3737
</div>
3838
</script>
39-
39+
4040
**Note:** Click events for elements with class name **k-edit-button** and **k-delete-button** will be automatically handled and treated by Kendo ListView as **edit** and **delete** actions.
4141

4242
2. Define `EditorTemplate` for the model:
4343

44-
@model Kendo.Mvc.Examples.Models.ProductViewModel
44+
@model Kendo.Mvc.Examples.Models.ProductViewModel
4545
<div class="product-view">
4646
<dl>
4747
<dt>Product Name</dt>
@@ -71,14 +71,14 @@ To configure Kendo ListView for ASP.NET MVC for editing follow these steps:
7171
</div>
7272
</div>
7373

74-
**Note:** Click events for elements with class name **k-update-button** and **k-cancel-button** will be automatically handled and treated by Kendo ListView as **save** and **cancel** actions.
74+
**Note:** Click events for elements with class name **k-update-button** and **k-cancel-button** will be automatically handled and treated by Kendo ListView as **save** and **cancel** actions. The editor template should be wrapped in a HTML container, same as the item template.
7575

7676
3. Enable listview editing:
7777

7878
@(Html.Kendo().ListView<Kendo.Mvc.Examples.Models.ProductViewModel>()
7979
.Name("listView")
8080
.TagName("div")
81-
.ClientTemplateId("list-view-template")
81+
.ClientTemplateId("list-view-template")
8282
.Editable() // <-- Enable editing
8383
)
8484

@@ -90,15 +90,15 @@ To configure Kendo ListView for ASP.NET MVC for editing follow these steps:
9090
.ClientTemplateId("list-view-template")
9191
.Editable()
9292
.DataSource(dataSource => dataSource
93-
// Configure CRUD -->
93+
// Configure CRUD -->
9494
.Create(create => create.Action("Editing_Create", "ListView"))
9595
.Read(read => read.Action("Editing_Read", "ListView"))
9696
.Update(update => update.Action("Editing_Update", "ListView"))
9797
.Destroy(destroy => destroy.Action("Editing_Destroy", "ListView"))
9898
// <-- Configure CRUD
99-
)
99+
)
100100
)
101-
101+
102102
5. Specify the property of the model which is the unique identifier (primary key):
103103

104104
@(Html.Kendo().ListView<Kendo.Mvc.Examples.Models.ProductViewModel>(Model)
@@ -108,14 +108,14 @@ To configure Kendo ListView for ASP.NET MVC for editing follow these steps:
108108
.Editable()
109109
.DataSource(dataSource => dataSource
110110
// Specify that the ProductID property is the unique identifier of the model
111-
.Model(model => model.Id("ProductID"))
111+
.Model(model => model.Id("ProductID"))
112112
.Create(create => create.Action("Editing_Create", "ListView"))
113113
.Read(read => read.Action("Editing_Read", "ListView"))
114114
.Update(update => update.Action("Editing_Update", "ListView"))
115115
.Destroy(destroy => destroy.Action("Editing_Destroy", "ListView"))
116-
)
116+
)
117117
)
118-
118+
119119
6. Implement the `Read` action method:
120120

121121
public ActionResult Editing_Read([DataSourceRequest] DataSourceRequest request)

0 commit comments

Comments
 (0)