Telerik MVC Grid - 启用客户端编辑
我知道这是一个相当具体的问题 - 但我无法在 Telerik MVC 网格文档。
我想知道是否有人知道通过客户端事件触发网格进入“编辑模式”的方法。我在使用工具栏时遇到了问题,并认为这可以通过 jQuery / JavaScript 实现。
$('#addName').click(function () {
var grid = $("#NamesGrid").data("tGrid");
//Enable Editing here?
return grid;
});
我正在使用服务器端绑定 - 因此,如果我必须执行 .post
或类似的操作,那么点击控制器操作并不是真正的问题。
谢谢
I know this is a rather specific question - but I wasn't able to find any help in the Telerik MVC Grid documentation.
I was wondering if anyone was aware of a way to trigger a grid into "edit mode" via a client-side event. I was having issues with the toolbar and thought this might be possible through jQuery / JavaScript.
$('#addName').click(function () {
var grid = $("#NamesGrid").data("tGrid");
//Enable Editing here?
return grid;
});
I am using server-side binding - so hitting a Controller action wouldn't really be an issue, if I had to do a .post
or something like that.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一些源代码探索之后 - 您可以通过添加以下内容来完成此操作:
显然,这个示例是针对弹出窗口内的网格 - 但希望这可以帮助其他遇到类似问题的人。
After a bit of exploring through source - you can accomplish this by adding the following:
Obviously this example was for a grid inside of a popup window - but hopefully this could help others if they ran into similar issues.