Hi,
It's a bug?
In hierarchy grid, and Inline Edit mode.
When I updated, and the RETURN result is null,
But why the Grid still has data?
MVC APSX:
<%: Html.Kendo().Grid<CarryingCapacityMD>() .Name("Grid").ToolBar(commands => commands.Create()) .Columns ( columns => { columns.Bound(o => o.Tonnage).Width(75).Format("{0:0.00}"); columns.Bound(o => o.CageCount).Width(75); columns.Command ( commands => { commands.Edit(); commands.Destroy(); } ).Width(180).Title("操作"); } ) .ClientDetailTemplateId("freightInformationTemplate") .DataSource ( dataSource => dataSource.Ajax() .Model ( model => { model.Id(p => p.CarryingCapacityID); } ) .Read("_AjaxCarryingCapacityList", "Configurations") .Update("_AjaxCarryingCapacityUpdate", "Configurations") .Destroy("_AjaxCarryingCapacityDelete", "Configurations") .Create("_AjaxCarryingCapacityInsert", "Configurations") ) .Editable(editing => editing.Mode(GridEditMode.PopUp)) %> <script id="freightInformationTemplate" type="text/kendo-tmpl"> <%: Html.Kendo().Grid<FreightInformation>() .Name("FreightInfo_#=CarryingCapacityID#") .Columns ( columns => { columns.Bound(o => o.LocationName).Width(75); columns.Bound(o => o.Mileage).Width(75); columns.Bound(o => o.Freight).Width(75).Format("{0:¥0.00}"); columns.Command(command => { command.Edit(); }); } ) .DataSource ( dataSource => dataSource.Ajax().ServerOperation(true) .Model ( model => { model.Id(p => p.FreightID); model.Field(p => p.LocationName).Editable(false); model.Field(p => p.Mileage).Editable(false); } ) .Read("_AjaxGetFreightInfoListByCarryingCapacityID", "Configurations", new { carryingCapacityID = "#=CarryingCapacityID#" }) .Update("_AjaxLocationUpdateForCarryingCapacity", "Configurations") ) //.Events(events => { events.SaveChanges("onSave");}) .Editable(editing => editing.Mode(GridEditMode.InLine)) //.ToolBar(commands => { commands.Save(); }) .ToClientTemplate() %>Behind Code:
[AcceptVerbs(HttpVerbs.Post)]public ActionResult _AjaxLocationUpdateForCarryingCapacity(FreightInformation updatedFreightInformation){ if (ModelState.IsValid) { freightRepository.UpdateForCarryingCapacity(updatedFreightInformation); } freightRepository = new FreightRepository(); return Json(freightRepository.GetFreightInfoByCarryingCapacityID(updatedFreightInformation.CarryingCapacityID)); //this result is null}But after update,
the grid is still show data.
Please see attachment file.