【问题标题】:Unexpected Behavior "beforeEdit" Event Handler. Kendo Ui Grid意外行为“beforeEdit”事件处理程序。剑道 Ui 网格
【发布时间】:2018-04-13 09:49:21
【问题描述】:

我的意图是根据 Kendo UI 网格中的不同“步骤”隐藏几列。更具体地说,我想使用“beforeEdit”事件处理程序显示隐藏在{field: "id", hidden: true}, 中的 2 列。

$("#grid").kendoGrid({
    save:console.log("save"),
    cancel:console.log("cancel"),
    beforeEdit: console.log("beforeEdit"),
    (...some more code...)
    dataSource: dataSource

});

根据 Kendo UI Doc(Link),这些处理程序应在编辑、保存或取消编辑时触发。出于测试目的,我在这些处理程序中制作了一个 console.log 输出。但无论如何,一旦我打开刷新页面,处理程序似乎就会触发。

我会很感激任何关于为什么会出现这种错误的信息。

致以最诚挚的问候 马塞尔

【问题讨论】:

    标签: kendo-ui event-handling kendo-grid


    【解决方案1】:

    好吧,我的错。今天是星期五...我忘了在触发器中定义一个函数。

    save:function(){
        console.log("save")
    },
    

    问题解决了!

    【讨论】:

    • cancelbeforeEdit 也是无效的。
    猜你喜欢
    • 2015-06-24
    • 1970-01-01
    • 1970-01-01
    • 2013-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多