0
我使用MVC C#和Html.Telerik()。网格Telerik的网格中添加,更新和删除不工作
我想补充,更新和删除的网格。但它不会发布数据来添加,更新和删除功能。
这是我的网
@(Html.Telerik().Grid<GownHire.Models.tblstudent>()
.Name("Grid")
.DataKeys(dataKeys => dataKeys.Add(c => c.PKStudentID))
.ToolBar(commands => commands.Insert())
.DataBinding(dataBinding => dataBinding
.Ajax()
.Select("_studentList", "Admin")
.Insert("studentInsert", "Admin")
.Update("studentUpdate", "Admin")
.Delete("studentDelete", "Admin")
)
.Columns(columns =>
{
columns.Bound(c => c.studentEnterDate);
columns.Bound(c => c.flage);
columns.Command(commands =>
{
commands.Edit();
commands.Delete();
})
.Width(180);
}))
这是多亩功能
[GridAction(EnableCustomBinding = true)]
public ActionResult studentUpdate(GridCommand command, tblstudent model)
{
// model data is null
}
什么是错我的代码?
您的方法名称在'.Ajax()'中声明。控制器类中的方法名称必须与这些名称匹配。 – hatchet
对不起。我忘了在我的问题中更改函数名称。仍然有相同的错误。 – user1348351
你是否完全确认你的更新方法没有通过在方法的顶部放置一个断点来调用? – hatchet