KendoUI Grid 绑定单击双击事件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了KendoUI Grid 绑定单击双击事件相关的知识,希望对你有一定的参考价值。
原文:http://blog.csdn.net/sakuya_tan/article/details/51437857
<div id="grid"></div> <script> var grid = $("#grid").kendoGrid({ columns: [ { field: "id" }, { field: "name" } ], dataSource: [ { id: "1", name: "lili" }, { id: "2", name: "jim" }, { id: "3", name: "jone" }, { id: "4", name: "tom" } ], filterable: true, sortable: true, navigatable: true, selectable: "multiple", pageable: { pageSize: 10, refresh: true }, columns: [ { field: "id", title: "账号" }, { field: "name", title: "姓名" } ], }); grid.on(‘dblclick‘, ‘.k-grid-content tr‘, function () { // 双击 var row = grid.data("kendoGrid").select(); var data = grid.data("kendoGrid").dataItem(row); var id = data.id; alert(‘双击事件【id:‘ + id + ‘】‘); }); grid.on(‘click‘, ‘.k-grid-content tr‘, function () { // 双击 var row = grid.data("kendoGrid").select(); var data = grid.data("kendoGrid").dataItem(row); var name = data.name; alert(‘单击事件【name:‘ + name + ‘】‘); }); </script>
以上是关于KendoUI Grid 绑定单击双击事件的主要内容,如果未能解决你的问题,请参考以下文章