Hi,
I am unsing Kendo with MVC 5. I am binding my Grid over Ajax. Reading works fine, but the controller method is never called. (see project attached)
thanks
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Customer_Update([DataSourceRequest] DataSourceRequest request, CustomerViewModel customer)
{
if(customer != null && ModelState.IsValid)
{
}
return Json(new[] { customer }.ToDataSourceResult(request, ModelState));
}
@(Html.Kendo().Grid<Rainbow.ViewModels.CustomerViewModel>()
.Name("CustomersGrid")
.Events(events => events.DataBound("onDataBound").DataBinding("onDataBinding").DetailInit("onDetailInit"))
.Columns(c =>
{
c.Bound(i => i.Number).Title("Number");
c.Bound(i => i.CompanyName).Title("Name");
c.Command(command => command.Edit());
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(d => d.Ajax()
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(c => c.Id))
.Read(r => r.Action("CustomersGridData", "Customer"))
.Update(r => r.Action("Customer_Update", "Customer")))
.Sortable()
.Filterable()
.Pageable())