kendo grid 点击选中与取消选中
取消选中使用clearSelection()函数,案例如下:
var selectIndex = 0;
$(function () {
$("#ComplaintRegistrationListGrid").on('click', '.k-selectable tr', function () {
var grid = $("#ComplaintRegistrationListGrid").data("kendoGrid");
var data = grid.dataItem(grid.select());
if (selectIndex == data.Index) {
grid.clearSelection();
} else {
selectIndex = data.Index;
}
});
})