0
我有這樣的劍道UI電網在ASP-NET MVC Web應用程序與劍道UI劍道UI格的自定義編輯和數據到達空
/*GRID*/
@(Html.Kendo().Grid(Model).Name("contactos")
.Columns(columns =>
{
..........
})
.ToolBar(toolBar =>
{
toolBar.Create();
toolBar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Groupable().Pageable().Sortable().Scrollable().Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
.......
}
)
.Read(read => read.Action("GetAllContactsClientJSON", "CrmCProfile", new { Id_Cliente = @ViewBag.Id_Cliente }))
.Create(create => create.Action("AddContact", "CrmCProfile"))
.Update(update => update.Action("UpdateContact", "CrmCProfile").Type(HttpVerbs.Post))
)
當我做更新,在未來的控制器操作:
/*Controller Action Update */
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UpdateContact([DataSourceRequest] DataSourceRequest request,IEnumerable<ContactosClientesVM> contactos)
{
if (contactos != null && ModelState.IsValid)
{
...
}
return Json(ModelState.ToDataSourceResult());
}
}
了IEnumerable contactos = NULL,
幫助!