[英]this.select() is not a function?
I am trying to test some example code that I have found and one of these samples clears the selection if a grid has detail sections, so only one line is highlighted at a time. 我正在尝试测试我发现的一些示例代码,并且如果网格中有详细节,则这些示例之一将清除选择,因此一次仅突出显示一行。
The example is below.. 示例如下。
function onRowSelect(e) {
var selected = this.select();
$('.k-grid tbody>.k-state-selected').not(selected).removeClass('k-state-selected')
}
and on the grid using 并在网格上使用
.Events(e => e.Change("onRowSelect()"))
I am using MVC and the latest builds (trials). 我正在使用MVC和最新版本(试用版)。 I get the error when the page loads Uncaught TypeError:
this.select is not a function
页面加载Uncaught TypeError时出现错误:
this.select is not a function
Can anyone point me to why this error is occurring? 谁能指出我为什么会发生此错误?
从更改事件处理程序定义中除去括号,因为当前它将在初始化期间调用:
.Events(e => e.Change("onRowSelect"));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.