Html 剑道网格行选择更改事件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14509337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 05:14:08  来源:igfitidea点击:

Kendo grid row selection change event?

clickkendo-uihtml

提问by Evolving Techie

I've couple of questions..

我有几个问题..

  1. I'm using Kendo grid and would like to know if it is feasible to fire an event at the document level when a row selection is changed.

    Basically, when a row selection is changed, I want to fire an event and this is done at the global level without depending on the gridID.

    Example:

    $('tr.k-state-selected').parents('tbody').live('change', function (e) { alert("onchange"); }); }

    But the above example do not work. I do not have any other classes defined on the grid/ body/ gridRow.

  2. How can I fire a click event using the span class on the kendo window (pop-up)

    I've tried below code but that doesn't work

        $('span.k-icon.k-i-close').parents('a').click(function (e) {
            alert("clicked!");
        });
    
  1. 我正在使用 Kendo 网格,想知道在更改行选择时在文档级别触发事件是否可行。

    基本上,当行选择更改时,我想触发一个事件,这是在全局级别完成的,而不依赖于 gridID。

    例子:

    $('tr.k-state-selected').parents('tbody').live('change', function (e) { alert("onchange"); }); }

    但是上面的例子不起作用。我没有在 grid/body/gridRow 上定义任何其他类。

  2. 如何使用剑道窗口(弹出)上的 span 类触发点击事件

    我试过下面的代码,但这不起作用

        $('span.k-icon.k-i-close').parents('a').click(function (e) {
            alert("clicked!");
        });
    

Do I need to include any adidtional classes for recognizing the kendo window ?

我是否需要包含任何额外的类来识别剑道窗口?

Any help will be much appreciated. Thanks in advance.

任何帮助都感激不尽。提前致谢。

回答by OnaBai

You are looking for changeevent.

您正在寻找change活动。

You might also been interested on taking a look into this demoshowing different gridevents.

您可能也有兴趣查看这个展示不同事件的演示grid