我有一个使用Kendo Grid的Web应用程序。我如何获得" Ticket No"的价值?选中的复选框?
我的代码是:
var grid = $("#poGrid").data("kendoGrid");
grid.items().filter(":has(:checked)").each(function () {
var tr = $(this);
console.log(grid.dataItem(tr));
console.log("Length => " + grid.dataItem(tr.length.toString()));
});
console.log(" grid.items().length => " + grid.items().length);
console.log(" grid.dataItem.ticketNumber => " + grid.dataItem.ticketNumber);
答案 0 :(得分:1)
您可以这样做:
grid.items().filter(":has(:checked)").each(function () {
var tr = $(this);
// Current data item
var dataItem = grid.dataItem(tr);
console.log(dataItem);
// Access the ticketNumber
var ticketNumber = dataitem.ticketNumber;
console.log("ticketNumber=> " + ticketNumber );
});