嗨,我在 ajax 模式下有 Telerik mvc 网格,并且启用了编辑。在我的场景中,我必须只使用插入模式,所以我禁用了编辑模式。但是当我运行时,单击“添加新记录”时出现 javascript 错误。示例项目可以从这里下载
问问题
2220 次
3 回答
1
I got this to work by the following:
function GridNotes_onEdit(e) {
$('#Content').after("<a class='t-button t-grid-cancel t-button-icon' href='#'><span class='t-icon t-cancel'/></a>")
.after("<a class='t-button t-grid-insert t-button-icon' href='#'><span class='t-icon t-insert'/></a>");
}
Now, this worked when I only had one field being inserted. If you have multiple columns, you may need to customize it to your specifications. But it is do-able. As well, it worked in a detail view grid.
Hope this helps...
于 2012-05-24T18:30:03.930 回答
0
If you are looking for an official support channel as you provided a sample project, post your request to the telerik MVC forums on their site.
于 2011-05-11T16:14:43.057 回答
0
有同样的问题。答案是内联需要有编辑按钮,所以在内联模式下插入会中断
这个链接涵盖了这一点并有一个修复。
http://www.telerik.com/community/forums/aspnet-mvc/grid/insert-only-with-server-editing.aspx
于 2011-06-02T21:44:07.917 回答