我想知道如何在 Kendo 移动 ListView 中获取所选项目的索引。这是我的代码
function loadInformation(){
$('#Template').kendoMobileListView({
dataSource: Info,
template: '<table style="width: 100%"><tr><td><p>${a = (typeof data.ServiceLocationCompanyName !== "undefined") ? data.ServiceLocationCompanyName : data.LastName + ", " + data.FirstName}</td><td style="width: 84px"><img src=${data.Icon} /></td></tr></table>',
// Added this event to capture the index of selected Item but was unsuccessful
click: function(){
var index = this.select().index(),
console.log(index);
}
});
当我运行它时,它给了我一个错误说
TypeError: Object [object Object] has no method 'select'
我需要在这里做什么?如何获取所选项目的索引?干杯