I have a Kendo.Grid that remains in edit mode after updating. The only difference between my code and the demo code (that I can tell) is I'm using a third party ORM. The demo works fine.
When/how does the grid know the data is persisted correctly?
Grid in View:
UpdateCellInventory in Controller:
Thanks,
Jerry
When/how does the grid know the data is persisted correctly?
Grid in View:
@(Html.Kendo() .Grid<Copper.Domain.Entities.EntInventory>() .Name("_gridCellInventory") .Columns(columns => { columns.Bound(c => c.DeviceName); columns.Command(cmd => cmd.Edit()); }) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable() .DataSource(datasource => datasource .Ajax() .PageSize(20) .Events(events => events.Error("error_handler")) .Model(model => model.Id(c => c.InventorySeq)) .Read(read => read.Action("GetCellInventory", "CellInventory").Data("_gridCellInventoryParameters")) .Update(update => update.Action("UpdateCellInventory", "CellInventory")) ) )UpdateCellInventory in Controller:
[AcceptVerbs(HttpVerbs.Post)]public ActionResult UpdateCellInventory([DataSourceRequest] DataSourceRequest request, EntInventory inventory){ if (inventory != null && ModelState.IsValid) { _margoRepository.UpdateInventory(inventory); } return Json(ModelState.ToDataSourceResult());}Thanks,
Jerry