1
我試圖選擇一個網格行並在新窗口中顯示它們的元素。我使用開源Kendo UI網格。我可以選擇。我想在kendo彈出窗口中顯示細節。但我無法獲得選定的行數據。它是如何的?選擇並顯示在新窗口Kendoui網格行數據?
$(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" }]
});
編輯。我發現獲取行索引。現在我只想在彈出的頁面上顯示。 ???
感謝的人,我明白。有用。 –