我能够在Kendo Grid中加载数据,并希望实现服务器编辑。 并创建了一个视图并保留在Views / Shared / EditorTemplate / EditEmployee.cshtml上。 当用户点击“编辑”按钮时,有人可以帮助我了解如何在新页面中打开该视图。 控制器:
//// GET:EmployeeList / Edit / 5
public ActionResult Edit(int Id, Employee Model)
{
using (var context = new EmployeeEntities())
{
var model = context.Employee.Find(Model.ID);
return View("EditEmployee");
}
}
答案 0 :(得分:0)
要完全手动完成,您可以添加一个事件进行编辑
.Events(e => e.Edit("onEdit"))
然后重定向:
function onEdit(e) {
employeeId = $("#EmployeeId").text();
window.location.href("Employee/Edit/" + editorId);
}