Kendo Grid取消编辑事件 [英] Kendo Grid cancel edit event

查看:111
本文介绍了Kendo Grid取消编辑事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在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?

推荐答案

基本上没有这样的取消"事件,但是您可以在

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆