Kendo Grid 取消编辑事件 [英] Kendo Grid cancel edit event
问题描述
我在 Kendo 网格上使用 edit
事件来显示几个隐藏的列.然后我将在 save
事件中再次隐藏它们.
I'm using the edit
event on a Kendo grid to show a couple of hidden columns. I'll then hide them again on the save
event.
我遇到的问题是似乎没有取消编辑模式的事件,所以如果用户点击取消,列就会搞砸.
Problem I have is that there doesn't appear to be an event for cancelling edit mode, so the column get screwed up if the user clicks cancel.
是否有未记录的取消事件或我需要寻找解决方法?
Is there an undocumented event for cancel or do I need to find a workaround?
推荐答案
基本上没有这样的取消"事件,但是你可以在еedit Grid 事件.请检查以下示例:
Basically there is no such "Cancel" event, however you can attach click event on the "Cancel" button in the еdit event of the Grid. Please check the example below:
function onEdit(e) {
e.container.find(".k-grid-cancel").bind("click", function () {
//your code here
})
}
从某个时候开始,网格有取消"事件,可以用来代替上述解决方案:
From some time the Grid have "cancel" event which can be used instead of the above solution:
这篇关于Kendo Grid 取消编辑事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!