【发布时间】:2014-01-29 10:58:17
【问题描述】:
我尝试选择一个网格行并在新窗口中显示其元素。我使用开源 Kendo ui 网格。我可以选择。我想在剑道弹出窗口中显示详细信息。但我无法获得选定的行数据。怎么可能?
$(document).ready(function () {
$("#grid").kendoGrid({
sortable: true,
pageable: {
refresh: true,
pageSizes: [5, 10, 100]
},
autoBind: true,
height: 500,
selectable: "row",
dataSource: {
transport: {
read: "/Raporlama/Getdata",
type: "json"
},
},
change: function(e) {
var username = this.select().closest("tr").find("td:eq(0)").text();
var loc = this.select().closest("tr").find("td:eq(1)").text();
var dev = this.select().closest("tr").find("td:eq(2)").text();
var com = this.select().closest("tr").find("td:eq(3)").text();
//show in a window.
},
columns: [
{ field: "username", title: "@Resources.reportColumnUser", width: "80px" },
{ field: "location", title: "@Resources.reportColumnLoc", width: "80px" },
{ field: "devices", title: "@Resources.reportColumnDevice", width: "80px" },
{ field: "command", title: "@Resources.reportColumnCom", width: "80px" }]
});
EDİT. 我发现要获取行索引。现在我只想在弹出页面上显示。 ???
【问题讨论】:
标签: asp.net-mvc kendo-ui kendo-grid