I currently have a ListView that I'm using to update database entries. I'm not getting any of the ModelState errors to display upon update. This is my main issue.
After reviewing the related tickets here, the solution seemed fairly simply. However, I'm having some issues, here is my ListView
@(Html.Kendo().ListView<
OrderEntry.Models.OrderEntry.Product
>()
.Name("ListView")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource => dataSource
.Model(model => model.Id(p => p.OrderID))
.PageSize(1)
.Read(read => read.Action("ProductReadAll", "Order", new { associatedOrderID = ViewBag.AssociatedOrderID }))
.Create(create => create.Action("ProductCreate", "OpsOrder"))
.Update(update => update.Action("ProductUpdate", "OpsOrder"))
.Events(e => e.Error("error"))
)
.Pageable()
.Editable(edit => edit.TemplateName("ProductEdit"))
)
My issue with this, adding the Error Event is causing an error stating that "error" (the name of whatever js function I use) is not defined in /Order/ProductDetailsRead. ProductDetailsRead is a method in my controller that is called to show the page this ListView is on. Why is the ListView looking in my controller for a js function? Haven't run into anything similar to this anywhere else in our website.
Are there any alternatives to showing modelstate errors when updating an item? Something more similar to grids?